[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160904192626.17197-4-mail@beyermatthias.de>
Date: Sun, 4 Sep 2016 21:26:24 +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 3/5] drivers: staging: rtl8723au: core: Refactor pointless branching
As ether_addr_equal returns a bool, we can simply use the return value
to set the variable.
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 | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
index da9f298..196447b 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1062,11 +1062,8 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf)
pmlmepriv->assoc_ssid.ssid);
}
- if (ether_addr_equal(pnetwork->network.MacAddress,
- cur_network->network.MacAddress))
- the_same_macaddr = true;
- else
- the_same_macaddr = false;
+ the_same_macaddr = ether_addr_equal(pnetwork->network.MacAddress,
+ cur_network->network.MacAddress);
pnetwork->network.Length = get_wlan_bssid_ex_sz(&pnetwork->network);
if (pnetwork->network.Length > sizeof(struct wlan_bssid_ex)) {
--
2.9.3
Powered by blists - more mailing lists