[ovs-dev] [sparse 4/4] datapath: Do not shadow 'err' variable name in tnl_send().
Ben Pfaff
blp at nicira.com
Mon Dec 27 23:38:13 UTC 2010
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.
I am not 100% certain that an error detected via 'xmit_err' should not be
propagated outward to 'err'. This patch proceeds on the assumption that
the code was correct as written, and does not change its behavior.
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
datapath/tunnel.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index eac3fa3..bf0ab56 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
--
1.7.1
More information about the dev
mailing list