Skip to contentSkip to conversation

staging: rtl8192u: Patch to modify if, else conditions

PATCH Superseded Dhere, Chaitanya (C.) 1 participant 1 message Jun 1, 2015 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 staging: rtl8192u: Patch to modify if, else conditions

From: Chaitanya Dhere <[email protected]>

In this patch, the if, else conditions are modified to remove the unnecessary equality checks. This change was detected with help of coccinelle tool.

---
 .../staging/rtl8192u/ieee80211/ieee80211_softmac.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +2 -4
index d2e8b12..1742e58 100644
@@ -1364,12 +1364,10 @@ static void ieee80211_associate_complete_wq(struct work_struct *work)
 		ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
 	}
 	ieee->link_change(ieee->dev);
-	if(ieee->is_silent_reset == 0){
+	if (!ieee->is_silent_reset) {
 		printk("============>normal associate\n");
 	notify_wx_assoc_event(ieee);
-	}
-	else if(ieee->is_silent_reset == 1)
-	{
+	} else {
 		printk("==================>silent reset associate\n");
 		ieee->is_silent_reset = false;
 	}
Signature · 1 line
1.7.9.5