[ovs-dev] [coverity 07/12] bridge: Rename iface_create() variable to avoid hiding parameter.
Ben Pfaff
blp at nicira.com
Thu Jan 24 22:44:32 UTC 2013
This function has a parameter 'ofp_port' and a local variable 'ofp_port',
so rename the local variable to reduce confusion.
Found by Coverity.
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
vswitchd/bridge.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index dd3099f..607ae5e 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -1446,9 +1446,9 @@ iface_create(struct bridge *br, struct if_cfg *if_cfg, int ofp_port)
error = netdev_open(port->name, "internal", &netdev);
if (!error) {
- uint16_t ofp_port = if_cfg->ofport;
+ uint16_t fake_ofp_port = if_cfg->ofport;
- ofproto_port_add(br->ofproto, netdev, &ofp_port);
+ ofproto_port_add(br->ofproto, netdev, &fake_ofp_port);
netdev_close(netdev);
} else {
VLOG_WARN("could not open network device %s (%s)",
--
1.7.2.5
More information about the dev
mailing list