diff options
| author | Kim Phillips <[email protected]> | 2012-07-03 17:41:56 -0500 |
|---|---|---|
| committer | Wolfgang Denk <[email protected]> | 2012-07-08 22:55:04 +0200 |
| commit | b8032734ee94f4031c71aa40f100e9ef181ea0ef (patch) | |
| tree | f191adf021d1b0439417b0390dc35b20a2252f92 | |
| parent | 8b6a4952e6064dc558cb7d5d375990b17491f26f (diff) | |
ext2fs: fix warning: 'blocknxt' may be used uninitialized
This warning was introduced in 436da3c "ext2load: increase read
speed":
ext2fs.c: In function 'ext2fs_read_file':
ext2fs.c:458:19: warning: 'blocknxt' may be used uninitialized in this function [-Wuninitialized]
this change makes it go away.
Cc: Eric Nelson <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Andreas Bießmann <[email protected]>
Cc: Reinhard Arlt <[email protected]>
Signed-off-by: Kim Phillips <[email protected]>
| -rw-r--r-- | fs/ext2/ext2fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index f1fce48a392..182f0acacae 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -438,7 +438,7 @@ int ext2fs_read_file } /* grab middle blocks in one go */ - if (i != pos / blocksize && i != blockcnt - 1 && blockcnt > 3) { + if (i != pos / blocksize && i < blockcnt - 1 && blockcnt > 3) { int oldblk = blknr; int blocknxt; while (i < blockcnt - 1) { |
