提交 04ca5837 编写于 作者: A Adrian Remonda 提交者: Greg Kroah-Hartman

Staging: most: mostcore/core.c. Fix "Using plain integer as NULL pointer" warnings

This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the pointer test against 0 with a logical test.
Signed-off-by: NAdrian Remonda <adrianremonda@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c942ea7a
...@@ -982,7 +982,7 @@ static ssize_t store_add_link(struct most_aim_obj *aim_obj, ...@@ -982,7 +982,7 @@ static ssize_t store_add_link(struct most_aim_obj *aim_obj,
if (ret) if (ret)
return ret; return ret;
if (mdev_devnod == 0 || *mdev_devnod == 0) { if (!mdev_devnod || *mdev_devnod == 0) {
snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, mdev_ch); snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, mdev_ch);
mdev_devnod = devnod_buf; mdev_devnod = devnod_buf;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册