netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][NETNS]: Don't initialize err variable twice.
@ 2008-04-21 13:07 Pavel Emelyanov
  2008-04-21 21:26 ` David Miller
  2008-04-23 16:14 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Emelyanov @ 2008-04-21 13:07 UTC (permalink / raw)
  To: David Miller, Linux Netdev List

The ip6_route_net_init() performs some unneeded actions.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 210a079..7f82e80 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2614,7 +2614,7 @@ struct ctl_table *ipv6_route_sysctl_init(struct net *net)
 
 static int ip6_route_net_init(struct net *net)
 {
-	int ret = 0;
+	int ret;
 
 	ret = -ENOMEM;
 	net->ipv6.ip6_dst_ops = kmemdup(&ip6_dst_ops_template,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][NETNS]: Don't initialize err variable twice.
  2008-04-21 13:07 [PATCH][NETNS]: Don't initialize err variable twice Pavel Emelyanov
@ 2008-04-21 21:26 ` David Miller
  2008-04-23 16:14 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2008-04-21 21:26 UTC (permalink / raw)
  To: xemul; +Cc: netdev

From: Pavel Emelyanov <xemul@openvz.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@openvz.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@openvz.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@openvz.org>
    Signed-off-by: David S. Miller <davem@davemloft.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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][NETNS]: Don't initialize err variable twice.
  2008-04-21 13:07 [PATCH][NETNS]: Don't initialize err variable twice Pavel Emelyanov
  2008-04-21 21:26 ` David Miller
@ 2008-04-23 16:14 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 3+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2008-04-23 16:14 UTC (permalink / raw)
  To: xemul; +Cc: davem, netdev

In article <480C91A9.4030004@openvz.org> (at Mon, 21 Apr 2008 17:07:53 +0400), Pavel Emelyanov <xemul@openvz.org> says:

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

Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-23 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-21 13:07 [PATCH][NETNS]: Don't initialize err variable twice Pavel Emelyanov
2008-04-21 21:26 ` David Miller
2008-04-23 16:14 ` YOSHIFUJI Hideaki / 吉藤英明

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).