diff mbox

[OPW,kernel,08/10] staging: lustre: Fix sparse warning on incompatible types for operation

Message ID d17edc9f110b6a01ba32e483a62a01f828a68d33.1383233124.git.dulshani.gunawardhana89@gmail.com
State New, archived
Headers show

Commit Message

Dulshani Gunawardhana Oct. 31, 2013, 3:33 p.m. UTC
Fix the following sparse warning:

drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39: error:
incompatible types for operation (>)
drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39:    left side
has type char *ioc_inlbuf2
drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39:    right
side has type int

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
---
 drivers/staging/lustre/lustre/obdclass/llog_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/staging/lustre/lustre/obdclass/llog_ioctl.c b/drivers/staging/lustre/lustre/obdclass/llog_ioctl.c
index da558a5..7bd1f94 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_ioctl.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_ioctl.c
@@ -385,7 +385,7 @@  int llog_ioctl(const struct lu_env *env, struct llog_ctxt *ctxt, int cmd,
 			GOTO(out_close, rc = -EINVAL);
 		}
 
-		if (data->ioc_inlbuf2 > 0) {
+		if (data->ioc_inlbuf2 != NULL) {
 			/* remove indicate log from the catalog */
 			rc = str2logid(&plain, data->ioc_inlbuf2,
 				       data->ioc_inllen2);