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>] [day] [month] [year] [list]
Message-Id: <20220902073717.319844-1-zhang.songyi@zte.com.cn>
Date:   Fri,  2 Sep 2022 07:37:17 +0000
From:   cgel.zte@...il.com
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 <zhang.songyi@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] xfrm: Remove the unneeded result variable

From: zhang songyi <zhang.songyi@....com.cn>

Return the xfrmi_create() directly instead of storing it in another
redundant variable.

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

diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index 5a67b120c4db..5508dc11ce42 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -774,7 +774,6 @@ static int xfrmi_newlink(struct net *src_net, struct net_device *dev,
 	struct net *net = dev_net(dev);
 	struct xfrm_if_parms p = {};
 	struct xfrm_if *xi;
-	int err;
 
 	xfrmi_netlink_parms(data, &p);
 	if (p.collect_md) {
@@ -804,8 +803,7 @@ static int xfrmi_newlink(struct net *src_net, struct net_device *dev,
 	xi->net = net;
 	xi->dev = dev;
 
-	err = xfrmi_create(dev);
-	return err;
+	return xfrmi_create(dev);
 }
 
 static void xfrmi_dellink(struct net_device *dev, struct list_head *head)
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ