Browse Source

staging: lustre: ptlrpc: remove unnecessary code

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>
Gustavo A. R. Silva 8 years ago
parent
commit
3f514c35c0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/lustre/lustre/ptlrpc/layout.c

+ 1 - 1
drivers/staging/lustre/lustre/ptlrpc/layout.c

@@ -1761,7 +1761,7 @@ static u32 __req_capsule_offset(const struct req_capsule *pill,
 		 field->rmf_name, offset, loc);
 		 field->rmf_name, offset, loc);
 	offset--;
 	offset--;
 
 
-	LASSERT(0 <= offset && offset < REQ_MAX_FIELD_NR);
+	LASSERT(offset < REQ_MAX_FIELD_NR);
 	return offset;
 	return offset;
 }
 }