[PATCH] staging: rtl8192u: Remove an unnecessary NULL check

Dan Carpenter dan.carpenter at oracle.com
Wed May 22 07:04:18 UTC 2019


On Tue, May 21, 2019 at 10:42:21AM -0700, Nathan Chancellor wrote:
> Clang warns:
> 
> drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2663:47: warning:
> address of array 'param->u.wpa_ie.data' will always evaluate to 'true'
> [-Wpointer-bool-conversion]
>             (param->u.wpa_ie.len && !param->u.wpa_ie.data))
>                                     ~~~~~~~~~~~~~~~~~^~~~
> 
> This was exposed by commit deabe03523a7 ("Staging: rtl8192u: ieee80211:
> Use !x in place of NULL comparisons") because we disable the warning
> that would have pointed out the comparison against NULL is also false:
> 

Heh.  Weird.  Why would people disable one and not the other?

regards,
dan carpenter



More information about the devel mailing list