]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: lustre: ptlrpc: remove unnecessary code
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Thu, 11 May 2017 04:27:40 +0000 (23:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 May 2017 05:41:59 +0000 (07:41 +0200)
offset is an unsigned variable and, greater-than-or-equal-to-zero
comparison of an unsigned variable is always true.

Addresses-Coverity-ID: 1373919
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/layout.c

index 8177e1a31ca976b9e16c647c4353fe6b3b07da72..5810bbab6585cb7c3823c9ca4950a3a4b03ee91f 100644 (file)
@@ -1761,7 +1761,7 @@ static u32 __req_capsule_offset(const struct req_capsule *pill,
                 field->rmf_name, offset, loc);
        offset--;
 
-       LASSERT(0 <= offset && offset < REQ_MAX_FIELD_NR);
+       LASSERT(offset < REQ_MAX_FIELD_NR);
        return offset;
 }