| To: | xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | xfsprogs: useless code blocks |
| From: | Jan Tulak <jtulak@xxxxxxxxxx> |
| Date: | Mon, 20 Jul 2015 09:57:46 -0400 (EDT) |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <2035333009.511763.1437398166766.JavaMail.zimbra@xxxxxxxxxx> |
| Thread-index: | hATFT9YUEf7oCMUwlcDOJOjXco7Kig== |
| Thread-topic: | xfsprogs: useless code blocks |
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@xxxxxxx, 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@xxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: XFS File system in trouble, Eric Sandeen |
|---|---|
| Next by Date: | Re: Data can't be wrote to XFS RIP [<ffffffffa041a99a>] xfs_dir2_sf_get_parent_ino+0xa/0x20, Kuo Hugo |
| Previous by Thread: | [PATCH v2 0/4] xfsprogs: Partial OS X support, Jan Tulak |
| Next by Thread: | Re: xfsprogs: useless code blocks, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |