提交 597ae468 编写于 作者: A Andreas Platschek 提交者: Greg Kroah-Hartman

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: NAndreas Platschek <platschek@ict.tuwien.ac.at>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 71397095
...@@ -385,7 +385,7 @@ int llog_ioctl(const struct lu_env *env, struct llog_ctxt *ctxt, int cmd, ...@@ -385,7 +385,7 @@ int llog_ioctl(const struct lu_env *env, struct llog_ctxt *ctxt, int cmd,
GOTO(out_close, rc = -EINVAL); GOTO(out_close, rc = -EINVAL);
} }
if (data->ioc_inlbuf2 > 0) { if (data->ioc_inllen2 > 0) {
/* remove indicate log from the catalog */ /* remove indicate log from the catalog */
rc = str2logid(&plain, data->ioc_inlbuf2, rc = str2logid(&plain, data->ioc_inlbuf2,
data->ioc_inllen2); data->ioc_inllen2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册