diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-18 01:02:55 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-23 13:08:36 +0100 |
commit | 55cd0f612a046137f0be936e7856921ada4546ca (patch) | |
tree | 33ebc2df612fe462d3f422834fe6c99c409320f1 /ldpd/ldpe.c | |
parent | zebra: On shutdown don't count removals (diff) | |
download | frr-55cd0f612a046137f0be936e7856921ada4546ca.tar.xz frr-55cd0f612a046137f0be936e7856921ada4546ca.zip |
*: Make assignment from RB_ROOT in while loop work better
Fix up the assignment of the variable = RB_ROOT inside of
while loop patter we were using.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ldpd/ldpe.c')
-rw-r--r-- | ldpd/ldpe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c index 9d00bcd2b..56af76d94 100644 --- a/ldpd/ldpe.c +++ b/ldpd/ldpe.c @@ -219,8 +219,11 @@ ldpe_shutdown(void) assert(if_addr != LIST_FIRST(&global.addr_list)); free(if_addr); } - while ((adj = RB_ROOT(global_adj_head, &global.adj_tree)) != NULL) + while (!RB_EMPTY(global_adj_head, &global.adj_tree)) { + adj = RB_ROOT(global_adj_head, &global.adj_tree); + adj_del(adj, S_SHUTDOWN); + } /* clean up */ if (iev_lde) |