lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170831120942.5kyzb2zuvbdohgpe@mwanda>
Date:   Thu, 31 Aug 2017 15:09:42 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Janani Sankara Babu <jananis37@...il.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, insafonov@...il.com,
        gs051095@...il.com
Subject: Re: [PATCH] staging:rtl8188eu:core Remove unneccessary else block

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ