xfsprogs: useless code blocks
Jan Tulak
jtulak at redhat.com
Mon Jul 20 08:57:46 CDT 2015
Hi all,
I found these useless bits of code in xfsprogs:
repair/incore_ino.c:575-576:
if (ino_rec->ino_startnum == 0)
ino_rec = ino_rec;
This one is pretty clear. It is there since 2001 (commit 2bd0ea187
by nathans at sgi.com, who didn't wrote here since 2006, so I find
CC-ing him useless). It looks like a forgotten code which doesn't
do anything, but I ask in case it is a hidden bug.
And:
db/check.c:3035, 3037: Always true expression, as be32_to_cpu()
translates to __u32 type and unsigned can't be less than zero.
be32_to_cpu(free->hdr.nvalid) < 0 ||
Is there any reason for these tests? I get different type sizes, or
endians as platform dependent, but signed/unsigned? Or it is
a big/little endian conversion hack?
Cheers,
Jan
--
Jan Tulak
jtulak at redhat.com
More information about the xfs
mailing list