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

From: Dan Carpenter
Date: Wed May 22 2019 - 03:07:17 EST

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->' will always evaluate to 'true'
> [-Wpointer-bool-conversion]
> (param->u.wpa_ie.len && !param->
> ~~~~~~~~~~~~~~~~~^~~~
> 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?

dan carpenter