lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 May 2015 16:55:57 +0000
From:	"Dhere, Chaitanya (C.)" <cvijaydh@...teon.com>
To:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"cristina.opriceana@...il.com" <cristina.opriceana@...il.com>,
	"hamohammed.sa@...il.com" <hamohammed.sa@...il.com>,
	"gdonald@...il.com" <gdonald@...il.com>,
	"mahfouz.saif.elyazal@...il.com" <mahfouz.saif.elyazal@...il.com>,
	"benoit.taine@...6.fr" <benoit.taine@...6.fr>,
	"paul.gortmaker@...driver.com" <paul.gortmaker@...driver.com>
CC:	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] staging: rtl8192u: Patch to modify if, else conditions

In this patch:
1. the if condition is modified to remove
the unnecessary equality check.
2. The else if condition is replaced by an else condition
since the variable checked in the if statement is a bool
making the else if unnecessary.
3. Fixed indentation problem on line 1369.
These changes were detected with help of coccinelle tool.

Signed-off-by: Chaitanya Dhere <cvijaydh@...teon.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index d2e8b12..41f74ab 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1364,12 +1364,11 @@ 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);
+		notify_wx_assoc_event(ieee);
 	}
-	else if(ieee->is_silent_reset == 1)
-	{
+	else {
 		printk("==================>silent reset associate\n");
 		ieee->is_silent_reset = false;
 	}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ