[PATCH 3/5] drivers: staging: rtl8723au: core: Refactor pointless branching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As ether_addr_equal returns a bool, we can simply use the return value
to set the variable.

Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx>
Signed-off-by: Manuel Messner <manuel.johannes.messner@xxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux