[ovs-dev] [coverity 07/12] bridge: Rename iface_create() variable to avoid hiding parameter.

Ethan Jackson ethan at nicira.com
Fri Feb 1 21:57:01 UTC 2013


Acked-by: Ethan Jackson <ethan at nicira.com>

On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff <blp at nicira.com> wrote:
> 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
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list