提交 15ab600c 编写于 作者: S Sachin Kamat 提交者: Greg Kroah-Hartman

Staging: speakup: Fix sparse warning in varhandlers.c

'cp' is a pointer. Fix the incorrect comparison with integer to
avoid the below warning:
drivers/staging/speakup/varhandlers.c:283:19: warning:
Using plain integer as NULL pointer
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6eb178ce
...@@ -277,7 +277,7 @@ int spk_set_mask_bits(const char *input, const int which, const int how) ...@@ -277,7 +277,7 @@ int spk_set_mask_bits(const char *input, const int which, const int how)
spk_chartab[*cp] &= ~mask; spk_chartab[*cp] &= ~mask;
} }
cp = (u_char *)input; cp = (u_char *)input;
if (cp == 0) if (!cp)
cp = spk_punc_info[which].value; cp = spk_punc_info[which].value;
else { else {
for ( ; *cp; cp++) { for ( ; *cp; cp++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册