Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1724160
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging:rtl8188eu:core Remove unneccessary else block |
| Date | 2017-08-31 14:20 +0200 |
| Message-ID | <ukwBX-5xb-3@gated-at.bofh.it> (permalink) |
| References | <ukvZh-52z-53@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 31, 2017 at 05:03:30PM +0530, Janani Sankara Babu wrote:
> This patch is created to remove the unneccessary else statement inside the
> function 'SecIsInPMKIDList'.
>
> Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
> ---
> drivers/staging/rtl8188eu/core/rtw_mlme.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> index d3668ca..8480d30 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> @@ -1708,13 +1708,10 @@ 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; */
> - }
> -
> + i++;
> + /* continue; */
Delete the continue comment as well. It doesn't add anything.
> } while (i < NUM_PMKID_CACHE);
Or you could move the increment into the condition, but you'd have to
make it a pre-op:
} while (++i < NUM_PMKID_CACHE);
regards,
dan carpenter
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] staging:rtl8188eu:core Remove unneccessary else block Janani Sankara Babu <jananis37@gmail.com> - 2017-08-31 13:40 +0200 Re: [PATCH] staging:rtl8188eu:core Remove unneccessary else block Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-31 14:20 +0200
csiph-web