| To: | xfs-masters@xxxxxxxxxxx, xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [xfs-masters] [PATCH] Uninitialized variable |
| From: | Wang Chen <wangchen@xxxxxxxxxxxxxx> |
| Date: | Fri, 04 Jul 2008 16:29:37 +0800 |
| Reply-to: | xfs-masters@xxxxxxxxxxx |
| Sender: | xfs-masters-bounce@xxxxxxxxxxx |
| User-agent: | Thunderbird 2.0.0.14 (Windows/20080421) |
If the following loop doesn't execute, "tp" will be an
uninitialized variable before being used.
-
for (bmbno = sbp->sb_rbmblocks -
((sbp->sb_rextents & ((1 << mp->m_blkbit_log) - 1)) != 0);
-
Signed-off-by: Wang Chen <wangchen@xxxxxxxxxxxxxx>
---
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index a0dc6e5..f1ab0ca 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1882,6 +1882,7 @@ xfs_growfs_rt(
sbp = &mp->m_sb;
cancelflags = 0;
+ tp = NULL;
/*
* Initial error checking.
*/
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [xfs-masters] Re: freeze vs freezer, Eric Sandeen |
|---|---|
| Next by Date: | [xfs-masters] Re: [PATCH] Uninitialized variable, Eric Sandeen |
| Previous by Thread: | [xfs-masters] web site noticed, Jehn Sanders |
| Next by Thread: | [xfs-masters] Re: [PATCH] Uninitialized variable, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |