]> err.no Git - linux-2.6/commitdiff
[GFS2] fs/gfs2/dir.c:gfs2_dir_write_data(): don't use an uninitialized variable
authorAdrian Bunk <bunk@stusta.de>
Thu, 19 Oct 2006 13:20:04 +0000 (15:20 +0200)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 20 Oct 2006 13:15:31 +0000 (09:15 -0400)
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>
fs/gfs2/dir.c

index ce52bd954df6c44c3b246782283e05c2b8f02788..ead7df066853b8aecbb497e4a8efbf70d828c5c7 100644 (file)
@@ -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)