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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160904192626.17197-3-mail@beyermatthias.de>
Date:   Sun,  4 Sep 2016 21:26:23 +0200
From:   Matthias Beyer <mail@...ermatthias.de>
To:     gregkh@...uxfoundation.org
Cc:     Matthias Beyer <mail@...ermatthias.de>,
        Larry Finger <Larry.Finger@...inger.net>,
        Jes Sorensen <Jes.Sorensen@...hat.com>,
        Manuel Messner <manuel.johannes.messner@...furtwangen.de>,
        Geliang Tang <geliangtang@....com>,
        Cihangir Akturk <cakturk@...il.com>,
        linux-wireless@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 2/5] drivers: staging: rtl8723au: core: simplify if-break-else

As the if statement breaks/continues the loop, the else block is not
useful and can be omitted.

Signed-off-by: Matthias Beyer <mail@...ermatthias.de>
Signed-off-by: Manuel Messner <manuel.johannes.messner@...furtwangen.de>
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 8b8b6a9..da9f298 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -244,21 +244,18 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
 			do_join_r = rtw_do_join(padapter);
 			if (do_join_r == _SUCCESS)
 				break;
-			else {
-				DBG_8723A("roaming do_join return %d\n",
-					  do_join_r);
-				pmlmepriv->to_roaming--;
 
-				if (padapter->mlmepriv.to_roaming > 0)
-					continue;
-				else {
-					DBG_8723A("%s(%d) -to roaming fail, "
-						  "indicate_disconnect\n",
-						  __func__, __LINE__);
-					rtw_indicate_disconnect23a(padapter);
-					break;
-				}
-			}
+			DBG_8723A("roaming do_join return %d\n", do_join_r);
+			pmlmepriv->to_roaming--;
+
+			if (padapter->mlmepriv.to_roaming > 0)
+				continue;
+
+			DBG_8723A("%s(%d) -to roaming fail, "
+				  "indicate_disconnect\n",
+				  __func__, __LINE__);
+			rtw_indicate_disconnect23a(padapter);
+			break;
 		}
 	}
 }
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ