mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 15:14:30 -04:00
staging: r8188eu: Remove pointless NULL check in rtw_check_join_candidate()
Clang warns:
drivers/staging/r8188eu/core/rtw_mlme.c:1629:28: warning: address of
array 'pmlmepriv->assoc_ssid.Ssid' will always evaluate to 'true'
[-Wpointer-bool-conversion]
if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) {
~~~~~~~~~~~~~~~~~~~~~~^~~~ ~~
1 warning generated.
Ssid is an array not at the beginning of a struct so its address cannot
be NULL so remove the check.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210805185807.3296077-4-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
760e7353a6
commit
bf7396230f
@@ -1622,7 +1622,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
||||
}
|
||||
|
||||
/* check ssid, if needed */
|
||||
if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) {
|
||||
if (pmlmepriv->assoc_ssid.SsidLength) {
|
||||
if (competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength ||
|
||||
memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength))
|
||||
goto exit;
|
||||
|
||||
Reference in New Issue
Block a user