diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-10-19 15:20:04 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-20 09:15:31 -0400 |
commit | 348acd48f050f5ba7fa917b1421ae34443be97dd (patch) | |
tree | 888d1915580fdb2629bc6165b700b2661d660f14 /fs/gfs2/dir.c | |
parent | b0cb66955f4bf7a72b544096ceef48a829361a3c (diff) |
[GFS2] fs/gfs2/dir.c:gfs2_dir_write_data(): don't use an uninitialized variable
In the "if (extlen)" case, "new" might be used uninitialized.
Looking at the code, it should be initialized to 0.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index ce52bd954df6..ead7df066853 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -184,7 +184,7 @@ static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf, while (copied < size) { unsigned int amount; struct buffer_head *bh; - int new; + int new = 0; amount = size - copied; if (amount > sdp->sd_sb.sb_bsize - o) |