Skip to content

Commit

Permalink
[GFS2] fs/gfs2/dir.c:gfs2_dir_write_data(): don't use an uninitialize…
Browse files Browse the repository at this point in the history
…d 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>
  • Loading branch information
Adrian Bunk authored and Steven Whitehouse committed Oct 20, 2006
1 parent b0cb669 commit 348acd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 348acd4

Please sign in to comment.