Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1476008
| From | Matthias Beyer <mail@beyermatthias.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/5] drivers: staging: rtl8723au: core: simplify if-break-else |
| Date | 2016-09-04 21:30 +0200 |
| Message-ID | <sdLh8-1yo-17@gated-at.bofh.it> (permalink) |
| References | <sdLh8-1yo-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
As the if statement breaks/continues the loop, the else block is not
useful and can be omitted.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Manuel Messner <manuel.johannes.messner@hs-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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c Matthias Beyer <mail@beyermatthias.de> - 2016-09-04 21:30 +0200
[PATCH 3/5] drivers: staging: rtl8723au: core: Refactor pointless branching Matthias Beyer <mail@beyermatthias.de> - 2016-09-04 21:30 +0200
[PATCH 4/5] drivers: staging: rtl8723au: core: Fix "space prohibited" warning Matthias Beyer <mail@beyermatthias.de> - 2016-09-04 21:30 +0200
[PATCH 2/5] drivers: staging: rtl8723au: core: simplify if-break-else Matthias Beyer <mail@beyermatthias.de> - 2016-09-04 21:30 +0200
[PATCH 5/5] drivers: staging: rtl8723au: core: Fix indentation Matthias Beyer <mail@beyermatthias.de> - 2016-09-04 21:40 +0200
Re: [PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-09-06 18:10 +0200
Re: [PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c Joe Perches <joe@perches.com> - 2016-09-06 18:10 +0200
Re: [PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-09-06 18:20 +0200
Re: [PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c Matthias Beyer <mail@beyermatthias.de> - 2016-09-07 09:50 +0200
csiph-web