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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211022146335400497@zte.com.cn>
Date:   Wed, 2 Nov 2022 21:46:33 +0800 (CST)
From:   <zhang.songyi@....com.cn>
To:     <steffen.klassert@...unet.com>
Cc:     <herbert@...dor.apana.org.au>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <zhang.songyi@....com.cn>, <jiang.xuexin@....com.cn>,
        <xue.zhihong@....com.cn>
Subject: [PATCH linux-next] net: af_key: remove redundant ret variable

>From a09ddf4bd144610fd17bdbf07f0c27700d805e6f Mon Sep 17 00:00:00 2001
From: zhang songyi <zhang.songyi@....com.cn>
Date: Wed, 2 Nov 2022 21:05:39 +0800
Subject: [PATCH linux-next] net: af_key: remove redundant ret variable

Return value from pfkey_net_init() directly instead of taking this in
another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: zhang songyi <zhang.songyi@....com.cn>
---
 net/key/af_key.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 213287814328..ec37825b1c15 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3863,14 +3863,11 @@ static struct xfrm_mgr pfkeyv2_mgr =
 static int __net_init pfkey_net_init(struct net *net)
 {
    struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
-   int rv;

    INIT_HLIST_HEAD(&net_pfkey->table);
    atomic_set(&net_pfkey->socks_nr, 0);

-   rv = pfkey_init_proc(net);
-
-   return rv;
+   return pfkey_init_proc(net);
 }

 static void __net_exit pfkey_net_exit(struct net *net)
--
2.15.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ