]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
filefrag: Fix uninitialized "expected" value
authorEric Sandeen <sandeen@redhat.com>
Fri, 16 Sep 2011 20:49:30 +0000 (15:49 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Sep 2011 22:43:05 +0000 (18:43 -0400)
commit1e003cc77d43ee01eeaae962ff6d264c9a74a363
treeb057e1ca4997a3b4eb67384357eefc25be655f96
parentd5c1d82ed8812a036846267a1720faec223c0ba0
filefrag: Fix uninitialized "expected" value

The "count" variable is only ever set if FIBMAP is used,
due to the -B switch, or a fiemap failure.  However,
we use it unconditionally to calculate "expected" for
extN files, so we can end up printing garbage.

Initialize count to 0, and unless we go through the FIBMAP
path, expected will be 0 as well, and in that case do not
print the message.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/filefrag.c