Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639184 > unrolled thread

[PATCH] staging: lustre: ptlrpc: remove unnecessary code

Started by"Gustavo A. R. Silva" <garsilva@embeddedor.com>
First post2017-05-11 06:30 +0200
Last post2017-05-11 06:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: lustre: ptlrpc: remove unnecessary code "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-11 06:30 +0200

#1639184 — [PATCH] staging: lustre: ptlrpc: remove unnecessary code

From"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date2017-05-11 06:30 +0200
Subject[PATCH] staging: lustre: ptlrpc: remove unnecessary code
Message-ID<tFNTH-1w1-5@gated-at.bofh.it>
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>
---
 drivers/staging/lustre/lustre/ptlrpc/layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
index 356d735..ff77b52 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
@@ -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;
 }
 
-- 
2.5.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web