bridge: Rename iface_create() variable to avoid hiding parameter.
authorBen Pfaff <blp@nicira.com>
Thu, 24 Jan 2013 21:57:37 +0000 (13:57 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 1 Feb 2013 22:26:54 +0000 (14:26 -0800)
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@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
vswitchd/bridge.c

index dd3099f..607ae5e 100644 (file)
@@ -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)",