Skip to contentSkip to conversation

staging:rtl8188eu:core Fix remove unneccessary else block

PATCH New Janani Sankara Babu 1 participant 1 message Sep 1, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging:rtl8188eu:core Fix remove unneccessary else block

This patch removes the unwanted braces and else statement inside the function 'SecIsInPMKIDList'

---
Changelog
V1 : Removed the else statement & Curly braces in If statement V2 : Removed the comment and added preincrement of i inside the while loop

 drivers/staging/rtl8188eu/core/rtw_mlme.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +2 -7
index d3668ca..9c2571d 100644
@@ -1708,14 +1708,9 @@ static int SecIsInPMKIDList(struct adapter *Adapter, u8 *bssid)
 
 	do {
 		if ((psecuritypriv->PMKIDList[i].bUsed) &&
-		    (!memcmp(psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN))) {
+		    (!memcmp(psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN)))
 			break;
-		} else {
-			i++;
-			/* continue; */
-		}
-
-	} while (i < NUM_PMKID_CACHE);
+	} while (++i < NUM_PMKID_CACHE);
 
 	if (i == NUM_PMKID_CACHE)
 		i = -1;/*  Could not find. */
Signature · 1 line
1.9.1