提交 348acd48 编写于 作者: A Adrian Bunk 提交者: Steven Whitehouse

[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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 b0cb6695
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册