diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2018-09-08 20:16:59 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2018-09-08 20:34:35 +0200 |
commit | 4f4060f6abbfa004e0eb63b7c447776cc74c8d66 (patch) | |
tree | db67b768f3c17767dc6aff86e17da01590b26df8 /ospf6d | |
parent | lib: fix SA warning in skiplist code (diff) | |
download | frr-4f4060f6abbfa004e0eb63b7c447776cc74c8d66.tar.xz frr-4f4060f6abbfa004e0eb63b7c447776cc74c8d66.zip |
*: fix clang-6 SA warnings
I don't see these in CI, but my local clang-6 does emit warnings for
these.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_asbr.c | 3 | ||||
-rw-r--r-- | ospf6d/ospf6_route.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 5af88defe..dc7a3f6d4 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -732,7 +732,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, ? 1 : 2, buf, listcount(route->paths), - listcount(route->nh_list)); + route->nh_list ? + listcount(route->nh_list) : 0); } if (listcount(route->paths)) { diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index a099eead4..021e825ae 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -732,7 +732,7 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route, route->next = next; if (node->info == next) { - assert(next->rnode == node); + assert(next && next->rnode == node); node->info = route; UNSET_FLAG(next->flag, OSPF6_ROUTE_BEST); SET_FLAG(route->flag, OSPF6_ROUTE_BEST); |