summaryrefslogtreecommitdiffstats
path: root/bgpd/rfapi
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-09-13 17:37:08 +0200
committerF. Aragon <paco@voltanet.io>2018-09-13 17:37:08 +0200
commit7fe96307ee288bd28a54ba4ddfa559a1cf07bb7f (patch)
tree43c78be92e26fe2a6adcc231c18ba869e0fb1ccf /bgpd/rfapi
parentMerge pull request #3007 from pacovn/static_analysis__shadow_variables2 (diff)
downloadfrr-7fe96307ee288bd28a54ba4ddfa559a1cf07bb7f.tar.xz
frr-7fe96307ee288bd28a54ba4ddfa559a1cf07bb7f.zip
bgpd lib ospf6d pbrd tests zebra: shadowing fixes
This fixes all remaining local variable shadowing cases Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'bgpd/rfapi')
-rw-r--r--bgpd/rfapi/bgp_rfapi_cfg.c34
-rw-r--r--bgpd/rfapi/vnc_import_bgp.c6
2 files changed, 20 insertions, 20 deletions
diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c
index f1dd08fda..15e397424 100644
--- a/bgpd/rfapi/bgp_rfapi_cfg.c
+++ b/bgpd/rfapi/bgp_rfapi_cfg.c
@@ -4015,21 +4015,21 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
vty_out(vty, "!\n");
if (hc->l2_groups) {
- struct rfapi_l2_group_cfg *rfg = NULL;
+ struct rfapi_l2_group_cfg *rfgc = NULL;
struct listnode *gnode;
- for (ALL_LIST_ELEMENTS_RO(hc->l2_groups, gnode, rfg)) {
+ for (ALL_LIST_ELEMENTS_RO(hc->l2_groups, gnode, rfgc)) {
struct listnode *lnode;
void *data;
++write;
- vty_out(vty, " vnc l2-group %s\n", rfg->name);
- if (rfg->logical_net_id != 0)
+ vty_out(vty, " vnc l2-group %s\n", rfgc->name);
+ if (rfgc->logical_net_id != 0)
vty_out(vty,
" logical-network-id %u\n",
- rfg->logical_net_id);
- if (rfg->labels != NULL
- && listhead(rfg->labels) != NULL) {
+ rfgc->logical_net_id);
+ if (rfgc->labels != NULL
+ && listhead(rfgc->labels) != NULL) {
vty_out(vty, " labels ");
- for (ALL_LIST_ELEMENTS_RO(rfg->labels,
+ for (ALL_LIST_ELEMENTS_RO(rfgc->labels,
lnode,
data)) {
vty_out(vty, "%hu ",
@@ -4040,28 +4040,28 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
vty_out(vty, "\n");
}
- if (rfg->rt_import_list && rfg->rt_export_list
- && ecommunity_cmp(rfg->rt_import_list,
- rfg->rt_export_list)) {
+ if (rfgc->rt_import_list && rfgc->rt_export_list
+ && ecommunity_cmp(rfgc->rt_import_list,
+ rfgc->rt_export_list)) {
char *b = ecommunity_ecom2str(
- rfg->rt_import_list,
+ rfgc->rt_import_list,
ECOMMUNITY_FORMAT_ROUTE_MAP,
ECOMMUNITY_ROUTE_TARGET);
vty_out(vty, " rt both %s\n", b);
XFREE(MTYPE_ECOMMUNITY_STR, b);
} else {
- if (rfg->rt_import_list) {
+ if (rfgc->rt_import_list) {
char *b = ecommunity_ecom2str(
- rfg->rt_import_list,
+ rfgc->rt_import_list,
ECOMMUNITY_FORMAT_ROUTE_MAP,
ECOMMUNITY_ROUTE_TARGET);
vty_out(vty, " rt import %s\n",
b);
XFREE(MTYPE_ECOMMUNITY_STR, b);
}
- if (rfg->rt_export_list) {
+ if (rfgc->rt_export_list) {
char *b = ecommunity_ecom2str(
- rfg->rt_export_list,
+ rfgc->rt_export_list,
ECOMMUNITY_FORMAT_ROUTE_MAP,
ECOMMUNITY_ROUTE_TARGET);
vty_out(vty, " rt export %s\n",
@@ -4074,7 +4074,7 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
.cfg_group_cb)(
vty, bgp->rfapi->rfp,
RFAPI_RFP_CFG_GROUP_L2,
- rfg->name, rfg->rfp_cfg);
+ rfgc->name, rfgc->rfp_cfg);
vty_out(vty, " exit-vnc\n");
vty_out(vty, "!\n");
}
diff --git a/bgpd/rfapi/vnc_import_bgp.c b/bgpd/rfapi/vnc_import_bgp.c
index dc37ff89b..74dc20a93 100644
--- a/bgpd/rfapi/vnc_import_bgp.c
+++ b/bgpd/rfapi/vnc_import_bgp.c
@@ -2398,11 +2398,11 @@ void vnc_import_bgp_exterior_add_route_interior(
}
if (list_adopted) {
struct listnode *node;
- struct agg_node *bi_exterior;
+ struct agg_node *an_bi_exterior;
- for (ALL_LIST_ELEMENTS_RO(list_adopted, node, bi_exterior)) {
+ for (ALL_LIST_ELEMENTS_RO(list_adopted, node, an_bi_exterior)) {
skiplist_delete(it->monitor_exterior_orphans,
- bi_exterior, NULL);
+ an_bi_exterior, NULL);
}
list_delete_and_null(&list_adopted);
}