datapath: Do not shadow 'err' variable name in tnl_send().
authorBen Pfaff <blp@nicira.com>
Mon, 27 Dec 2010 23:28:58 +0000 (15:28 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 28 Dec 2010 17:16:43 +0000 (09:16 -0800)
The sparse checker reported that 'err' was used for two different variables
in tnl_send().  The two variables have different types, so this patch
renames the inner one.

Jesse confirmed that the original code was correct as written.  This patch
does not change its behavior.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/tunnel.c

index eac3fa3d86f15bbd21f475ef45846425d05532fa..bf0ab56bdbe7815ed91de8e87432dac5e2be2952 100644 (file)
@@ -1294,12 +1294,12 @@ int tnl_send(struct vport *vport, struct sk_buff *skb)
                                vport_receive(cache_vport, skb);
                                sent_len += orig_len;
                        } else {
-                               int err;
+                               int xmit_err;
 
                                skb->dev = rt_dst(rt).dev;
-                               err = dev_queue_xmit(skb);
+                               xmit_err = dev_queue_xmit(skb);
 
-                               if (likely(net_xmit_eval(err) == 0))
+                               if (likely(net_xmit_eval(xmit_err) == 0))
                                        sent_len += orig_len;
                        }
                } else