diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-06-10 13:59:06 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-06-10 13:59:06 +0200 |
commit | 95b3f03d89101fa812a8e4648f5745e2d532037b (patch) | |
tree | e60163d3e73f82be60239746686f959e8e5f6f57 /ospf6d/ospf6_abr.c | |
parent | ospf6d: Fix coverity Possible null deref (diff) | |
download | frr-95b3f03d89101fa812a8e4648f5745e2d532037b.tar.xz frr-95b3f03d89101fa812a8e4648f5745e2d532037b.zip |
ospf6d: Rename ospf6_is_router_abr to more accurately reflect what it does
The ospf6_is_router_abr is checking to see if ospfv3 is an abr router
and also setting values. Let's rename it too `ospf6_check_and_set_router_abr`
to more accurately reflect what it is doing.
Additionally fix coverity #1505176 where we were not checking the return
value of ospf6_is_router_abr like we did every other time. In this
case we don't care about the return value so indicate that we do not.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r-- | ospf6d/ospf6_abr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index a43118cb2..f289bf26b 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -53,7 +53,7 @@ unsigned char conf_debug_ospf6_abr; -int ospf6_is_router_abr(struct ospf6 *o) +bool ospf6_check_and_set_router_abr(struct ospf6 *o) { struct listnode *node; struct ospf6_area *oa; @@ -74,12 +74,12 @@ int ospf6_is_router_abr(struct ospf6 *o) if (IS_OSPF6_DEBUG_ABR) zlog_debug("%s : set flag OSPF6_FLAG_ABR", __func__); SET_FLAG(o->flag, OSPF6_FLAG_ABR); - return 1; + return true; } else { if (IS_OSPF6_DEBUG_ABR) zlog_debug("%s : reset flag OSPF6_FLAG_ABR", __func__); UNSET_FLAG(o->flag, OSPF6_FLAG_ABR); - return 0; + return false; } } @@ -1359,7 +1359,7 @@ void ospf6_abr_reexport(struct ospf6_area *oa) struct ospf6_route *route; /* if not a ABR return success */ - if (!ospf6_is_router_abr(oa->ospf6)) + if (!ospf6_check_and_set_router_abr(oa->ospf6)) return; /* Redo summaries if required */ |