Skip to contentSkip to conversation

Staging: rtl8188eu: core: rtw_mlme.c: Replace NULL comparision.

PATCH New Sanjana Sanikommu 1 participant 1 message Mar 18, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: rtl8188eu: core: rtw_mlme.c: Replace NULL comparision.

Replace NULL comparison with '!' in the file rtw_mlme.c Issue found by checkpatch.pl semantic patch results for rtw_mlme.c

CHECK:Comparision to NULL could be written "!candidate"

---
Changes in v2:
Remove unnecessary paranthesis

 drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +1 -1
index ca0cf8a86671..2b5aaa940957 100644
@@ -1438,7 +1438,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
 			goto exit;
 	}
 
-	if (*candidate == NULL || (*candidate)->network.Rssi < competitor->network.Rssi) {
+	if (!*candidate || (*candidate)->network.Rssi < competitor->network.Rssi) {
 		*candidate = competitor;
 		updated = true;
 	}
Signature · 1 line
2.17.1