fs/gfs2/dir.c:gfs2_dir_write_data(): don't use an uninitialized variable
PATCH 6/8 fs/gfs2/dir.c:gfs2_dir_write_data(): don't use an uninitialized variable
Quoted 1 line
From
348acd48f050f5ba7fa917b1421ae34443be97ddMon Sep 17 00:00:00 2001
From: Adrian Bunk <[email protected]>
Date: Thu, 19 Oct 2006 15:20:04 +0200
Subject: [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 <[email protected]>
Signed-off-by Steven Whitehouse <[email protected]>
--- fs/gfs2/dir.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/gfs2/dir.c +1 -1
@@ -184,7 +184,7 @@ static int gfs2_dir_write_data(struct gfwhile (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)
Signature · 1 line
1.4.1