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]
Date:   Fri, 14 Jan 2022 14:12:50 -0800
From:   John Johansen <john.johansen@...onical.com>
To:     cgel.zte@...il.com
Cc:     jmorris@...ei.org, serge@...lyn.com,
        linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] security/apparmor: remove redundant ret variable

On 1/12/22 12:03 AM, cgel.zte@...il.com wrote:
> From: Minghao Chi <chi.minghao@....com.cn>
> 
> Return value from nf_register_net_hooks() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@...il.com>

Acked-by: John Johansen <john.johansen@...onical.com>

I will pull this into my tree

> ---
>  security/apparmor/lsm.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index ce7d96627810..f3deeb8b712e 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -1799,11 +1799,8 @@ static const struct nf_hook_ops apparmor_nf_ops[] = {
>  
>  static int __net_init apparmor_nf_register(struct net *net)
>  {
> -	int ret;
> -
> -	ret = nf_register_net_hooks(net, apparmor_nf_ops,
> +	return nf_register_net_hooks(net, apparmor_nf_ops,
>  				    ARRAY_SIZE(apparmor_nf_ops));
> -	return ret;
>  }
>  
>  static void __net_exit apparmor_nf_unregister(struct net *net)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ