summaryrefslogtreecommitdiff
path: root/ldpd/lde_lib.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-10-06 17:50:19 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-10-06 17:50:19 -0300
commit11bf8e13f2034634601ba1fb43114164e71c71fe (patch)
tree91a7324c8d3a96c2a10254f6f91ac99b50b43d2f /ldpd/lde_lib.c
parent3782fb37b1c480f2a1c3811fb703bdd5981ca60a (diff)
ldpd: sprinkle in some asserts to make scan-build happy
While here, fix the other SA warnings. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/lde_lib.c')
-rw-r--r--ldpd/lde_lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldpd/lde_lib.c b/ldpd/lde_lib.c
index c56b7e33d0..18c8c0a122 100644
--- a/ldpd/lde_lib.c
+++ b/ldpd/lde_lib.c
@@ -229,8 +229,10 @@ fec_free(void *arg)
struct fec_node *fn = arg;
struct fec_nh *fnh;
- while ((fnh = LIST_FIRST(&fn->nexthops)))
+ while ((fnh = LIST_FIRST(&fn->nexthops))) {
fec_nh_del(fnh);
+ assert(fnh != LIST_FIRST(&fn->nexthops));
+ }
if (!RB_EMPTY(lde_map_head, &fn->downstream))
log_warnx("%s: fec %s downstream list not empty", __func__,
log_fec(&fn->fec));