diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-13 14:37:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 14:37:22 +0200 |
commit | fc6eb7d827d7373a89dd04c1d809059e9ef79f9e (patch) | |
tree | 407311c755f8251639660af2ecd05cb647085005 /ospfd | |
parent | Merge pull request #3009 from pacovn/static_analysis__shadow_variables3 (diff) | |
parent | bgpd isisd ospf6d ospfd: variable shadowing fixes (diff) | |
download | frr-fc6eb7d827d7373a89dd04c1d809059e9ef79f9e.tar.xz frr-fc6eb7d827d7373a89dd04c1d809059e9ef79f9e.zip |
Merge pull request #3006 from pacovn/static_analysis__shadow_variables1
bgpd isisd ospf6d ospfd: variable shadowing fixes
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_flood.c | 1 | ||||
-rw-r--r-- | ospfd/ospf_ia.c | 8 | ||||
-rw-r--r-- | ospfd/ospf_nsm.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_packet.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_zebra.c | 2 | ||||
-rw-r--r-- | ospfd/ospfd.c | 3 |
6 files changed, 3 insertions, 15 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index b4e9dda58..807845593 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -539,7 +539,6 @@ static int ospf_flood_through_interface(struct ospf_interface *oi, IP addresses for these packets are the neighbors' IP addresses. */ if (oi->type == OSPF_IFTYPE_NBMA) { - struct route_node *rn; struct ospf_neighbor *nbr; for (rn = route_top(oi->nbrs); rn; rn = route_next(rn)) diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c index 86d15480a..f1ba8a31e 100644 --- a/ospfd/ospf_ia.c +++ b/ospfd/ospf_ia.c @@ -589,23 +589,19 @@ static void ospf_examine_transit_summaries(struct ospf_area *area, void ospf_ia_routing(struct ospf *ospf, struct route_table *rt, struct route_table *rtrs) { + struct listnode *node; struct ospf_area *area; if (IS_DEBUG_OSPF_EVENT) zlog_debug("ospf_ia_routing():start"); if (IS_OSPF_ABR(ospf)) { - struct listnode *node; - struct ospf_area *area; - switch (ospf->abr_type) { case OSPF_ABR_STAND: if (IS_DEBUG_OSPF_EVENT) zlog_debug("ospf_ia_routing():Standard ABR"); if ((area = ospf->backbone)) { - struct listnode *node; - if (IS_DEBUG_OSPF_EVENT) { zlog_debug( "ospf_ia_routing():backbone area found"); @@ -694,8 +690,6 @@ void ospf_ia_routing(struct ospf *ospf, struct route_table *rt, break; } } else { - struct listnode *node; - if (IS_DEBUG_OSPF_EVENT) zlog_debug( "ospf_ia_routing():not ABR, considering all areas"); diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 985e2efc9..fc8b516af 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -714,7 +714,7 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state) ospf_router_lsa_update_area(oi->area); if (oi->type == OSPF_IFTYPE_VIRTUALLINK) { - struct ospf_area *vl_area = ospf_area_lookup_by_area_id( + vl_area = ospf_area_lookup_by_area_id( oi->ospf, oi->vl_data->vl_area_id); if (vl_area) diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 76359a539..59340fbf1 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -4091,7 +4091,7 @@ void ospf_ls_upd_send(struct ospf_neighbor *nbr, struct list *update, int flag, ospf_lsa_lock(lsa)); /* oi->ls_upd_queue */ if (send_lsupd_now) { struct list *send_update_list; - struct route_node *rn, *rnext; + struct route_node *rnext; for (rn = route_top(oi->ls_upd_queue); rn; rn = rnext) { rnext = route_next(rn); diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 5dfea4378..912142b78 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -1205,7 +1205,6 @@ static void ospf_filter_update(struct access_list *access) /* Update distribute-list, and apply filter. */ for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) { struct list *red_list; - struct listnode *node; struct ospf_redist *red; red_list = ospf->redist[type]; @@ -1295,7 +1294,6 @@ void ospf_prefix_list_update(struct prefix_list *plist) */ for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) { struct list *red_list; - struct listnode *node; struct ospf_redist *red; red_list = ospf->redist[type]; diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index a8535fa9c..b18c5a93a 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -719,8 +719,6 @@ static void ospf_finish_final(struct ospf *ospf) ospf_lsdb_free(ospf->lsdb); for (rn = route_top(ospf->maxage_lsa); rn; rn = route_next(rn)) { - struct ospf_lsa *lsa; - if ((lsa = rn->info) != NULL) { ospf_lsa_unlock(&lsa); rn->info = NULL; @@ -756,7 +754,6 @@ static void ospf_finish_final(struct ospf *ospf) for (i = ZEBRA_ROUTE_SYSTEM; i <= ZEBRA_ROUTE_MAX; i++) { struct list *ext_list; - struct listnode *node; struct ospf_external *ext; ext_list = ospf->external[i]; |