OpenVZ Forum


Home » Mailing lists » Devel » [PATCH][IPV4] Remove bugus goto-s from ip_route_input_slow
[PATCH][IPV4] Remove bugus goto-s from ip_route_input_slow [message #23032] Sat, 10 November 2007 14:27 Go to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Both places look like

        if (err == XXX) 
               goto yyy;
   done:

while both yyy targets look like

        err = XXX;
        goto done;

so this is ok to remove the above if-s.

yyy labels are used in other places and are not removed.

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

---

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 21b12de..c95b270 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1813,11 +1813,6 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 		goto martian_destination;
 
 	err = ip_mkroute_input(skb, &res, &fl, in_dev, daddr, saddr, tos);
-	if (err == -ENOBUFS)
-		goto e_nobufs;
-	if (err == -EINVAL)
-		goto e_inval;
-
 done:
 	in_dev_put(in_dev);
 	if (free_res)
-- 
1.5.3.4
Re: [PATCH][IPV4] Remove bugus goto-s from ip_route_input_slow [message #23045 is a reply to message #23032] Sun, 11 November 2007 05:26 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Pavel Emelyanov <xemul@openvz.org>
Date: Sat, 10 Nov 2007 17:27:50 +0300

> Both places look like
> 
>         if (err == XXX) 
>                goto yyy;
>    done:
> 
> while both yyy targets look like
> 
>         err = XXX;
>         goto done;
> 
> so this is ok to remove the above if-s.
> 
> yyy labels are used in other places and are not removed.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied, thanks.
Previous Topic: [BUG]: Crash with CONFIG_FAIR_CGROUP_SCHED=y
Next Topic: [PATCH] Make helper to get dst entry and "use" is
Goto Forum:
  


Current Time: Sun Jul 21 09:54:33 GMT 2024

Total time taken to generate the page: 0.02319 seconds