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


Groups > linux.kernel > #1486050 > unrolled thread

[PATCH 025/124] staging: lustre: llite: Compare of unsigned value against 0 is always true

Started byJames Simmons <jsimmons@infradead.org>
First post2016-09-18 23:10 +0200
Last post2016-09-18 23:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 025/124] staging: lustre: llite: Compare of unsigned value against 0 is always true James Simmons <jsimmons@infradead.org> - 2016-09-18 23:10 +0200

#1486050 — [PATCH 025/124] staging: lustre: llite: Compare of unsigned value against 0 is always true

FromJames Simmons <jsimmons@infradead.org>
Date2016-09-18 23:10 +0200
Subject[PATCH 025/124] staging: lustre: llite: Compare of unsigned value against 0 is always true
Message-ID<siRvA-4Ox-17@gated-at.bofh.it>
From: Dmitry Eremin <dmitry.eremin@intel.com>

Comparison of unsigned value against 0 is always true.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5200
Reviewed-on: http://review.whamcloud.com/11217
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/lproc_llite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index af233ea..fc2ba56 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -846,7 +846,7 @@ static ssize_t unstable_stats_store(struct kobject *kobj,
 
 	if (!count)
 		return 0;
-	if (count < 0 || count >= sizeof(kernbuf))
+	if (count >= sizeof(kernbuf))
 		return -EINVAL;
 
 	if (copy_from_user(kernbuf, buffer, count))
-- 
1.7.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web