summaryrefslogtreecommitdiff
path: root/ovn
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@ovn.org>2018-02-27 17:34:14 -0800
committerJustin Pettit <jpettit@ovn.org>2018-02-28 15:02:44 -0800
commit396d492cfa8dcc6bb9b636a042d419b798e49264 (patch)
treeea430f7bb5ee763fe2f7e43db06b8a80831f2968 /ovn
parent84b99a04900a745f7addef616eb188a2dccf3233 (diff)
downloadopenvswitch-396d492cfa8dcc6bb9b636a042d419b798e49264.tar.gz
Don't shadow variables.
Rename the remaining variables that were shadowing another definition. Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r--ovn/controller/ofctrl.c12
-rw-r--r--ovn/controller/pinctrl.c10
-rw-r--r--ovn/northd/ovn-northd.c8
3 files changed, 15 insertions, 15 deletions
diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c
index 897ff3694..293b00f67 100644
--- a/ovn/controller/ofctrl.c
+++ b/ovn/controller/ofctrl.c
@@ -587,9 +587,9 @@ static ovs_be32
queue_msg(struct ofpbuf *msg)
{
const struct ofp_header *oh = msg->data;
- ovs_be32 xid = oh->xid;
+ ovs_be32 xid_ = oh->xid;
rconn_send(swconn, msg, tx_counter);
- return xid;
+ return xid_;
}
static void
@@ -1038,7 +1038,7 @@ ofctrl_put(struct hmap *flow_table, struct shash *pending_ct_zones,
/* Add a barrier to the list of messages. */
struct ofpbuf *barrier = ofputil_encode_barrier_request(OFP13_VERSION);
const struct ofp_header *oh = barrier->data;
- ovs_be32 xid = oh->xid;
+ ovs_be32 xid_ = oh->xid;
ovs_list_push_back(&msgs, &barrier->list_node);
/* Queue the messages. */
@@ -1051,7 +1051,7 @@ ofctrl_put(struct hmap *flow_table, struct shash *pending_ct_zones,
SHASH_FOR_EACH(iter, pending_ct_zones) {
struct ct_zone_pending_entry *ctzpe = iter->data;
if (ctzpe->state == CT_ZONE_OF_SENT && !ctzpe->of_xid) {
- ctzpe->of_xid = xid;
+ ctzpe->of_xid = xid_;
}
}
@@ -1076,7 +1076,7 @@ ofctrl_put(struct hmap *flow_table, struct shash *pending_ct_zones,
* so that we don't send a notification that we're up-to-date
* until we're really caught up. */
VLOG_DBG("advanced xid target for nb_cfg=%"PRId64, nb_cfg);
- fup->xid = xid;
+ fup->xid = xid_;
goto done;
} else {
break;
@@ -1086,7 +1086,7 @@ ofctrl_put(struct hmap *flow_table, struct shash *pending_ct_zones,
/* Add a flow update. */
fup = xmalloc(sizeof *fup);
ovs_list_push_back(&flow_updates, &fup->list_node);
- fup->xid = xid;
+ fup->xid = xid_;
fup->nb_cfg = nb_cfg;
done:;
} else if (!ovs_list_is_empty(&flow_updates)) {
diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c
index e34916f5c..95ccd54e4 100644
--- a/ovn/controller/pinctrl.c
+++ b/ovn/controller/pinctrl.c
@@ -119,9 +119,9 @@ queue_msg(struct ofpbuf *msg)
return xid;
}
-/* Sets up 'swconn', a newly (re)connected connection to a switch. */
+/* Sets up global 'swconn', a newly (re)connected connection to a switch. */
static void
-pinctrl_setup(struct rconn *swconn)
+pinctrl_setup(void)
{
/* Fetch the switch configuration. The response later will allow us to
* change the miss_send_len to UINT16_MAX, so that we can enable
@@ -135,10 +135,10 @@ pinctrl_setup(struct rconn *swconn)
}
static void
-set_switch_config(struct rconn *swconn,
+set_switch_config(struct rconn *swconn_,
const struct ofputil_switch_config *config)
{
- enum ofp_version version = rconn_get_version(swconn);
+ enum ofp_version version = rconn_get_version(swconn_);
struct ofpbuf *request = ofputil_encode_set_config(config, version);
queue_msg(request);
}
@@ -1078,7 +1078,7 @@ pinctrl_run(struct controller_ctx *ctx,
}
if (conn_seq_no != rconn_get_connection_seqno(swconn)) {
- pinctrl_setup(swconn);
+ pinctrl_setup();
conn_seq_no = rconn_get_connection_seqno(swconn);
flush_put_mac_bindings();
}
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index dcaa77dbf..d83681c4f 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -440,10 +440,10 @@ struct macam_node {
};
static void
-cleanup_macam(struct hmap *macam)
+cleanup_macam(struct hmap *macam_)
{
struct macam_node *node;
- HMAP_FOR_EACH_POP (node, hmap_node, macam) {
+ HMAP_FOR_EACH_POP (node, hmap_node, macam_) {
free(node);
}
}
@@ -4463,9 +4463,9 @@ add_router_lb_flow(struct hmap *lflows, struct ovn_datapath *od,
while (ip_str && ip_str[0]) {
char *ip_address = NULL;
uint16_t port = 0;
- int addr_family;
+ int addr_family_;
ip_address_and_port_from_lb_key(ip_str, &ip_address, &port,
- &addr_family);
+ &addr_family_);
if (!ip_address) {
break;
}