staging: r8723au: replace explicit NULL comparisons with !
PATCH 1/1 staging: r8723au: replace explicit NULL comparisons with !
Replace explicit NULL comparisons with ! operator to simplify code.
--- drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723au/core/rtw_ap.c +2 -2
@@ -919,8 +919,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,break ; } -if ((p ==NULL ) || (ie_len ==0 )) -break ; +if (!p || !ie_len) +break ; }/* wmm */
Signature · 1 line
2.1.4
Quoted 1 line · Alison Schofield
Replace explicit NULL comparisons with ! operator to simplify code.
They actually aren't both NULL comparisons.
julia
Quoted 31 lines
Signed-off-by Alison Schofield <[email protected]>--- drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8723au/core/rtw_ap.c +2
-3@@ -919,8 +919,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,break ; } -if ((p ==NULL ) || (ie_len ==0 )) -break ; +if (!p || !ie_len) +break ; }/* wmm */ --2.1.4
--
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/20151016162645.GA17124%40Ubuntu-D830.
For more options, visit https://groups.google.com/d/optout.
PATCH v2 1/1 staging: r8723au: replace NULL and zero comparison tests with ! operator
In reply to Alison SchofieldReplace explicit NULL comparison and zero comparison test with ! operator to simplify code.
---
Change in v2: commit & description message update to include zero case.
drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723au/core/rtw_ap.c +2 -2
@@ -919,8 +919,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,break ; } -if ((p ==NULL ) || (ie_len ==0 )) -break ; +if (!p || !ie_len) +break ; }/* wmm */
Signature · 1 line
2.1.4