summaryrefslogtreecommitdiff
path: root/ldpd/interface.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 15:21:15 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 15:21:15 -0400
commit42732e05a9a97a18f496eb559a77062a1b4b420e (patch)
tree03c8b87c2b26cb43b7b241f5ab0db6583c4b5a30 /ldpd/interface.c
parent056d8355967b372566a98432f07e4cff66ab17b0 (diff)
parent2d6e6d36d7e847b997f29097268dc529bd154d10 (diff)
Merge branch 'master' into stylechecker
Diffstat (limited to 'ldpd/interface.c')
-rw-r--r--ldpd/interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ldpd/interface.c b/ldpd/interface.c
index bbcea9f553..b25be43a5c 100644
--- a/ldpd/interface.c
+++ b/ldpd/interface.c
@@ -306,8 +306,11 @@ if_reset(struct iface *iface, int af)
ia = iface_af_get(iface, af);
if_stop_hello_timer(ia);
- while ((adj = RB_ROOT(ia_adj_head, &ia->adj_tree)) != NULL)
+ while (!RB_EMPTY(ia_adj_head, &ia->adj_tree)) {
+ adj = RB_ROOT(ia_adj_head, &ia->adj_tree);
+
adj_del(adj, S_SHUTDOWN);
+ }
/* try to cleanup */
switch (af) {