Staging: rtl8188eu: core: rtw_mlme.c: Replace NULL comparision.
PATCH 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"
--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +1 -1
@@ -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
Quoted 2 lines · Sanjana Sanikommu
Replace NULL comparison with '!' in the file
rtw_mlme.cIssue found by checkpatch.pl semantic patch results forrtw_mlme.c
You don't need to add the parentheses.
julia
Quoted 31 lines
CHECK:Comparision to NULL could be written "!candidate"
Signed-off-by Sanjana Sanikommu <[email protected]>--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8188eu/core/rtw_mlme.c +1
-2@@ -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; } --2.17.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190318132203.13505-1-sanjana99reddy99%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 10 lines · Julia Lawall
Quoted 2 lines · Sanjana Sanikommu
Replace NULL comparison with '!' in the file
rtw_mlme.cIssue found by checkpatch.pl semantic patch results forrtw_mlme.cYou don't need to add the parentheses.
I would remove them in next version.
Thank you.
Sanjana
Quoted 44 lines
julia
Review
Quoted 9 lines
CHECK:Comparision to NULL could be written "!candidate"
Signed-off-by Sanjana Sanikommu <[email protected] <javascript:>>---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/staging/rtl8188eu/core/rtw_mlme.cdrivers/staging/rtl8188eu/core/rtw_mlme.c static int rtw_check_join_candidate(struct
Quoted 4 lines
index
cbee02a86d22..ecac6b428154100644drivers/staging/rtl8188eu/core/rtw_mlme.c +0
-0@@ -1438,7 +1438,7 @@ static int rtw_check_join_candidate(struct
mlme_priv*pmlmeprivdrivers/staging/rtl8188eu/core/rtw_mlme.c static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
Quoted 4 lines
drivers/staging/rtl8188eu/core/rtw_mlme.c +0
-1goto exit; } - if (*candidate == NULL || (*candidate)->network.Rssi <
competitor->network.Rssi) {drivers/staging/rtl8188eu/core/rtw_mlme.c static int rtw_check_join_candidate(struct · line 1441
Quoted 1 line
drivers/staging/rtl8188eu/core/rtw_mlme.c +1
-0+ if (!(*candidate) || (*candidate)->network.Rssi <
competitor->network.Rssi) {Quoted 8 lines
drivers/staging/rtl8188eu/core/rtw_mlme.c +0
-0*candidate = competitor; updated = true; }Signature · 4 lines
2.17.1 -- You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected] <javascript:>.
Quoted 1 line
To post to this group, send email to [email protected]
<javascript:>.
Quoted 1 line
To view this discussion on the web visit
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.