Skip to contentSkip to conversation

staging: rtl8188eu: core: rtw_ap: remove boolean comparison

PATCH In review Anchal Jain 2 participants 2 messages Sep 30, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: rtl8188eu: core: rtw_ap: remove boolean comparison

Boolean tests do not need explicit comparison to true or false.

---
 drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_ap.c +1 -1
index 79d326a..fbe9941 100644
@@ -767,7 +767,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
 		update_hw_ht_param(padapter);
 	}
 
-	if (pmlmepriv->cur_network.join_res != true) { /* setting only at  first time */
+	if (pmlmepriv->cur_network.join_res) { /* setting only at  first time */
 		/* WEP Key will be set before this function, do not clear CAM. */
 		if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) &&
 		    (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
Signature · 1 line
1.9.1
#1 lore raw
Quoted 12 lines · Anchal Jain

Boolean tests do not need explicit comparison to true or false.

---
 drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_ap.c +0 -0
index 79d326a..fbe9941 100644

drivers/staging/rtl8188eu/core/rtw_ap.c static void start_bss_network(struct adapter *padapter, u8 *pbuf) · line 770

Quoted 5 lines
drivers/staging/rtl8188eu/core/rtw_ap.c +1 -1
@@ -767,7 +767,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
 		update_hw_ht_param(padapter);
 	}
 
-	if (pmlmepriv->cur_network.join_res != true) { /* setting only at  first time */
+	if (pmlmepriv->cur_network.join_res) { /* setting only at  first time */

It looks like you have inverted the sense of the test.

julia

Quoted 13 lines
drivers/staging/rtl8188eu/core/rtw_ap.c +0 -1
 		/* WEP Key will be set before this function, do not clear CAM. */
 		if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) &&
 		    (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
--

1.9.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/20160930164424.GA4879%40life-desktop.
For more options, visit https://groups.google.com/d/optout.