From: Ben Pfaff Date: Mon, 27 Dec 2010 23:28:58 +0000 (-0800) Subject: datapath: Do not shadow 'err' variable name in tnl_send(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddffedda18b6f919cb896265e126574d75fcaf00;p=openvswitch datapath: Do not shadow 'err' variable name in tnl_send(). 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 Acked-by: Jesse Gross --- diff --git a/datapath/tunnel.c b/datapath/tunnel.c index eac3fa3d..bf0ab56b 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -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