From: Dan Carpenter <dan.carpenter@oracle.com>
To: Janani Sankara Babu <jananis37@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, insafonov@gmail.com,
gs051095@gmail.com
Subject: Re: [PATCH] staging:rtl8188eu:core Remove unneccessary else block
Date: Thu, 31 Aug 2017 15:09:42 +0300 [thread overview]
Message-ID: <20170831120942.5kyzb2zuvbdohgpe@mwanda> (raw)
In-Reply-To: <1504179210-2295-1-git-send-email-jananis37@gmail.com>
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
prev parent reply other threads:[~2017-08-31 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 11:33 Janani Sankara Babu
2017-08-31 12:09 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170831120942.5kyzb2zuvbdohgpe@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=gs051095@gmail.com \
--cc=insafonov@gmail.com \
--cc=jananis37@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®