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]
Date:	Mon, 21 Apr 2008 14:26:11 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	xemul@...nvz.org
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH][NETNS]: Don't initialize err variable twice.

From: Pavel Emelyanov <xemul@...nvz.org>
Date: Mon, 21 Apr 2008 17:07:53 +0400

> The ip6_route_net_init() performs some unneeded actions.
> 
> Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>

Applied, except that I put the initialization with the
variable declaration to save screen real-estate when
people look at this code :-)  Like so:

commit 633d424bf33dab99e77b36210fbd1b996e7823df
Author: Pavel Emelyanov <xemul@...nvz.org>
Date:   Mon Apr 21 14:25:23 2008 -0700

    [NETNS]: Don't initialize err variable twice.
    
    The ip6_route_net_init() performs some unneeded actions.
    
    Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>
    Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1f42bc9..a493ad9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2614,9 +2614,8 @@ struct ctl_table *ipv6_route_sysctl_init(struct net *net)
 
 static int ip6_route_net_init(struct net *net)
 {
-	int ret = 0;
+	int ret = -ENOMEM;
 
-	ret = -ENOMEM;
 	net->ipv6.ip6_dst_ops = kmemdup(&ip6_dst_ops_template,
 					sizeof(*net->ipv6.ip6_dst_ops),
 					GFP_KERNEL);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ