Whamcloud - gitweb
e2fsprogs: Remove impossible name_len tests.
authorEric Sandeen <sandeen@redhat.com>
Fri, 16 Sep 2011 20:49:17 +0000 (15:49 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Sep 2011 22:43:04 +0000 (18:43 -0400)
commit11ba79b3a67c864d23e04d1a2977b173f594bee9
treeabeef52751a0429d617e9b90e845a23f249f86b0
parentbc28abc537ff49d708abd66cc70ee451fdd010fd
e2fsprogs: Remove impossible name_len tests.

The name_len field in ext2_dir_entry is actually comprised of
the name length in the lower 8 bytes, and the filetype in the
high 8 bytes.  So in places, we mask name_len with 0xFF to
get the actual length.

But once we have masked name_len with 0xFF, there is no point
in testing whether it is greater than EXT2_NAME_LEN, which
is 255 - or 0xFF.  So all of these tests are extraneous.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/dump.c
debugfs/htree.c
debugfs/ls.c
e2fsck/message.c
e2fsck/pass2.c