summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorAndreas Platschek <platschek@ict.tuwien.ac.at>2014-05-19 13:37:25 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-23 21:05:35 +0900
commit597ae4685a5654fbb542227cd08283071276d05a (patch)
treeec069251a82b5b8e790553f345f8ff4324a25100 /drivers/staging/lustre
parent71397095763ca7f6b71a7193882eefb16d672928 (diff)
staging: lustre: check length of char array
This fixes the following sparse error: 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: Andreas Platschek <platschek@ict.tuwien.ac.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/obdclass/llog_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/llog_ioctl.c b/drivers/staging/lustre/lustre/obdclass/llog_ioctl.c
index da558a5dc92b..e192aab193bb 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_inllen2 > 0) {
/* remove indicate log from the catalog */
rc = str2logid(&plain, data->ioc_inlbuf2,
data->ioc_inllen2);