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]
Message-Id: <1445001991-24113-1-git-send-email-luisbg@osg.samsung.com>
Date:	Fri, 16 Oct 2015 14:26:31 +0100
From:	Luis de Bethencourt <luisbg@....samsung.com>
To:	linux-kernel@...r.kernel.org
Cc:	dan.carpenter@...cle.com, devel@...verdev.osuosl.org,
	hamohammed.sa@...il.com, paul.gortmaker@...driver.com,
	gregkh@...uxfoundation.org, gdonald@...il.com,
	cristina.opriceana@...il.com, gascoar@...il.com,
	shraddha.6596@...il.com, mahfouz.saif.elyazal@...il.com,
	Luis de Bethencourt <luisbg@....samsung.com>
Subject: [PATCH v2] staging: rtl8192u: simplify conditional statement

The code can be much cleaner and readable by simplifying the conditional
statement.

Only need to check if (ieee->state > IEEE80211_LINKED) and not >= because
(ieee->state == IEEE80211_LINKED) is already checked a few lines above.

Signed-off-by: Luis de Bethencourt <luisbg@....samsung.com>
---

Sorry for the typo in the previous version and not double checking.

Shame,
Luis

 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index c443e2e..f85e5ff 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -466,10 +466,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
 		/* this prevent excessive time wait when we
 		 * need to wait for a syncro scan to end..
 		 */
-		if(ieee->state < IEEE80211_LINKED)
-			;
-		else
-		if (ieee->sync_scan_hurryup)
+		if (ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup)
 			goto out;
 
 
-- 
2.5.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