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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220414194118.GA4144553@jaehee-ThinkPad-X1-Extreme>
Date:   Thu, 14 Apr 2022 15:41:18 -0400
From:   Jaehee Park <jhpark1013@...il.com>
To:     Pavel Skripkin <paskripkin@...il.com>
Cc:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org, outreachy@...ts.linux.dev
Subject: Re: [PATCH 1/6] staging: r8188eu: remove unnecessary braces in
 single statement block

On Wed, Apr 13, 2022 at 11:24:46PM +0300, Pavel Skripkin wrote:
> Hi Jaehee,
> 
> On 4/13/22 23:11, Jaehee Park wrote:
> > Remove braces for single statement block to minimize the number of
> > empty lines, without loss of readability. Issue found with checkpatch.
> > WARNING: braces {} are not necessary for single statement blocks
> > 
> > Signed-off-by: Jaehee Park <jhpark1013@...il.com>
> > ---
> >   drivers/staging/r8188eu/core/rtw_mlme.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
> > index 3e9882f89f76..d3f4d7cdfa08 100644
> > --- a/drivers/staging/r8188eu/core/rtw_mlme.c
> > +++ b/drivers/staging/r8188eu/core/rtw_mlme.c
> > @@ -112,9 +112,8 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
> >   	rtw_free_mlme_priv_ie_data(pmlmepriv);
> > -	if (pmlmepriv) {
> > +	if (pmlmepriv)
> >   		vfree(pmlmepriv->free_bss_buf);
> > -	}
> 
> If pmlmepriv is equal to NULL we would die in rtw_free_mlme_priv_ie_data(),
> so this check is just redundant
> 

Hi Pavel, thank you for your comment! If I'm removing this if statement,
should I include vfree(pmlmepriv->free_bss_buf) in 
rtw_free_mlme_priv_ie_data?

> 
> 
> 
> With regards,
> Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ