Re: [PATCH 2/2] Staging: speakup: Fix sparse warning in varhandlers.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sachin Kamat, le Mon 13 May 2013 15:30:42 +0530, a écrit :
> '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@xxxxxxxxxx>

Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  drivers/staging/speakup/varhandlers.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c
> index 7f6288f..0752a5f 100644
> --- a/drivers/staging/speakup/varhandlers.c
> +++ b/drivers/staging/speakup/varhandlers.c
> @@ -280,7 +280,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++) {
> -- 
> 1.7.9.5
> 

-- 
Samuel
* B kicks DW (non mais franchement)
* DW was kicked
 -+- #ens-mim - comment ça hopeless ? -+-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux