mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 14:56:54 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7139709576
commit
597ae4685a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user