diff options
author | Manoj Naragund <mnaragund@vmware.com> | 2021-09-30 19:28:11 +0200 |
---|---|---|
committer | Manoj Naragund <mnaragund@vmware.com> | 2021-10-06 17:54:47 +0200 |
commit | bc465fb6cc7cfbad3301d6d0ceb4fb539dbaec35 (patch) | |
tree | bb2fd852dd9e7cb66717756fe7e2f50db9551765 /ospf6d/ospf6_abr.c | |
parent | ospf6d: minor struct compare issues. (diff) | |
download | frr-bc465fb6cc7cfbad3301d6d0ceb4fb539dbaec35.tar.xz frr-bc465fb6cc7cfbad3301d6d0ceb4fb539dbaec35.zip |
ospf6d: code cleanup.
removal of some of the deadcode in ospf6d.
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r-- | ospf6d/ospf6_abr.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 057e1d9ea..f3e8127a8 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -53,12 +53,11 @@ unsigned char conf_debug_ospf6_abr; -int ospf6_ls_origin_cmp(struct ospf6_path *o_path, struct ospf6_route *route) +int ospf6_ls_origin_same(struct ospf6_path *o_path, struct ospf6_path *r_path) { - if (((o_path->origin.type == route->path.origin.type) - && (o_path->origin.id == route->path.origin.id) - && (o_path->origin.adv_router == - route->path.origin.adv_router))) + if (((o_path->origin.type == r_path->origin.type) + && (o_path->origin.id == r_path->origin.id) + && (o_path->origin.adv_router == r_path->origin.adv_router))) return 1; else return 0; @@ -826,8 +825,8 @@ void ospf6_abr_old_path_update(struct ospf6_route *old_route, struct ospf6_nexthop *nh, *rnh; for (ALL_LIST_ELEMENTS(old_route->paths, anode, anext, o_path)) { - if (o_path->area_id != route->path.area_id || - (!ospf6_ls_origin_cmp(o_path, route))) + if (o_path->area_id != route->path.area_id + || !ospf6_ls_origin_same(o_path, &route->path)) continue; if ((o_path->cost == route->path.cost) && @@ -1242,8 +1241,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) for (ALL_LIST_ELEMENTS_RO(old_route->paths, anode, o_path)) { - if (o_path->area_id == route->path.area_id && - (ospf6_ls_origin_cmp(o_path, route))) + if (o_path->area_id == route->path.area_id + && ospf6_ls_origin_same(o_path, &route->path)) break; } |