[PATCH 2/3] staging: rtl8723bs: remove unnecessary braces from conditionals

From: Shreyansh Chouhan
Date: Mon May 24 2021 - 09:51:21 EST


Removed the braces from if else statements in core/rtw_wlan_util.c since
the previous commit (6a257dd6de516573) caused all conditional blocks to
have a single statement in the function check_assoc_AP.

Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@xxxxxxxxx>
---
.../staging/rtl8723bs/core/rtw_wlan_util.c | 35 +++++++++----------
1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 36e515a7ab5c..dd965c810967 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -1532,25 +1532,24 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)

switch (pIE->ElementID) {
case WLAN_EID_VENDOR_SPECIFIC:
- if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (!memcmp(pIE->data, ARTHEROS_OUI2, 3))) {
+ if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (!memcmp(pIE->data, ARTHEROS_OUI2, 3)))
return HT_IOT_PEER_ATHEROS;
- } else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) ||
- (!memcmp(pIE->data, BROADCOM_OUI2, 3)) ||
- (!memcmp(pIE->data, BROADCOM_OUI3, 3))) {
- return HT_IOT_PEER_BROADCOM;
- } else if (!memcmp(pIE->data, MARVELL_OUI, 3)) {
- return HT_IOT_PEER_MARVELL;
- } else if (!memcmp(pIE->data, RALINK_OUI, 3)) {
- return HT_IOT_PEER_RALINK;
- } else if (!memcmp(pIE->data, CISCO_OUI, 3)) {
- return HT_IOT_PEER_CISCO;
- } else if (!memcmp(pIE->data, REALTEK_OUI, 3)) {
- return get_realtek_assoc_AP_vender(pIE);
- } else if (!memcmp(pIE->data, AIRGOCAP_OUI, 3)) {
- return HT_IOT_PEER_AIRGO;
- } else {
- break;
- }
+ else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) ||
+ (!memcmp(pIE->data, BROADCOM_OUI2, 3)) ||
+ (!memcmp(pIE->data, BROADCOM_OUI3, 3)))
+ return HT_IOT_PEER_BROADCOM;
+ else if (!memcmp(pIE->data, MARVELL_OUI, 3))
+ return HT_IOT_PEER_MARVELL;
+ else if (!memcmp(pIE->data, RALINK_OUI, 3))
+ return HT_IOT_PEER_RALINK;
+ else if (!memcmp(pIE->data, CISCO_OUI, 3))
+ return HT_IOT_PEER_CISCO;
+ else if (!memcmp(pIE->data, REALTEK_OUI, 3))
+ return get_realtek_assoc_AP_vender(pIE);
+ else if (!memcmp(pIE->data, AIRGOCAP_OUI, 3))
+ return HT_IOT_PEER_AIRGO;
+ else
+ break;

default:
break;
--
2.31.1