Staging: speakup: Fix sparse warning in varhandlers.c
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 13 May 2013 10:00:42 +0000 (15:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:17:29 +0000 (16:17 -0700)
'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: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/varhandlers.c

index 2e8603d7b14a48273d381c37ca2468cd19996ff3..9aa2a78cd71cd87dfad5785a9fab9d2f26e497e2 100644 (file)
@@ -277,7 +277,7 @@ int spk_set_mask_bits(const char *input, const int which, const int how)
                        spk_chartab[*cp] &= ~mask;
        }
        cp = (u_char *)input;
-       if (cp == 0)
+       if (!cp)
                cp = spk_punc_info[which].value;
        else {
                for ( ; *cp; cp++) {