Skip to contentSkip to conversation

staging: lustre: ptlrpc: remove unnecessary code

PATCH New Gustavo A. R. Silva 1 participant 1 message May 11, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 drivers/staging/lustre/lustre/ptlrpc/layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/ptlrpc/layout.c +1 -1
index 356d735..ff77b52 100644
@@ -1762,7 +1762,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;
 }
 
Signature · 1 line
2.5.0