summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
authorAdrian Bunk2006-10-19 15:20:04 +0200
committerSteven Whitehouse2006-10-20 15:15:31 +0200
commit348acd48f050f5ba7fa917b1421ae34443be97dd (patch)
tree888d1915580fdb2629bc6165b700b2661d660f14 /fs/gfs2/dir.c
parent[GFS2] fs/gfs2/ops_fstype.c:gfs2_get_sb_meta(): remove unused variable (diff)
downloadkernel-qcow2-linux-348acd48f050f5ba7fa917b1421ae34443be97dd.tar.gz
kernel-qcow2-linux-348acd48f050f5ba7fa917b1421ae34443be97dd.tar.xz
kernel-qcow2-linux-348acd48f050f5ba7fa917b1421ae34443be97dd.zip
[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.c2
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)