dumpscan: Unsigned ints can't be less than 0
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 15 Feb 2013 17:23:51 +0000 (17:23 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Wed, 20 Feb 2013 18:23:16 +0000 (10:23 -0800)
'y' is an unsigned int, and therefore can never be less than 0, so
don't bother checking if it is.

Caught by clang-analyzer

Change-Id: I65e9e6e2a6f72a4a1a861234c5db89cc9d99ef15
Reviewed-on: http://gerrit.openafs.org/9138
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/tools/dumpscan/util.c

index 778eac7..8179ad5 100644 (file)
@@ -138,7 +138,7 @@ match_next_vnode(XFILE * X, dump_parser * p, dt_uint64 * where,
            return DSERR_FMT;
        if (x > vnode && x - vnode > 10000)
            return DSERR_FMT;
-       if (y < 0 || y > p->vol_uniquifier)
+       if (y > p->vol_uniquifier)
            return DSERR_FMT;
 
        /* Now, what follows the vnode/uniquifier? */