diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-19 23:27:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 23:27:55 +0200 |
commit | d368cd48b94cb9a22b9733200d8cfd94c71338ce (patch) | |
tree | 5b8d5a6bcd026fac8bffad24fece194df9bf7232 /ldpd/ldp_vty_conf.c | |
parent | Merge pull request #725 from donaldsharp/vrf_completion (diff) | |
parent | lib: fix __unused compilation on old platforms (diff) | |
download | frr-d368cd48b94cb9a22b9733200d8cfd94c71338ce.tar.xz frr-d368cd48b94cb9a22b9733200d8cfd94c71338ce.zip |
Merge pull request #730 from opensourcerouting/rbtree-improvement
RB tree improvement
Diffstat (limited to 'ldpd/ldp_vty_conf.c')
-rw-r--r-- | ldpd/ldp_vty_conf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c index c96e69a6c..532c880af 100644 --- a/ldpd/ldp_vty_conf.c +++ b/ldpd/ldp_vty_conf.c @@ -1553,17 +1553,18 @@ l2vpn_del_api(struct ldpd_conf *conf, struct l2vpn *l2vpn) struct l2vpn_if *lif; struct l2vpn_pw *pw; - while ((lif = RB_ROOT(&l2vpn->if_tree)) != NULL) { + while ((lif = RB_ROOT(l2vpn_if_head, &l2vpn->if_tree)) != NULL) { QOBJ_UNREG(lif); RB_REMOVE(l2vpn_if_head, &l2vpn->if_tree, lif); free(lif); } - while ((pw = RB_ROOT(&l2vpn->pw_tree)) != NULL) { + while ((pw = RB_ROOT(l2vpn_pw_head, &l2vpn->pw_tree)) != NULL) { QOBJ_UNREG(pw); RB_REMOVE(l2vpn_pw_head, &l2vpn->pw_tree, pw); free(pw); } - while ((pw = RB_ROOT(&l2vpn->pw_inactive_tree)) != NULL) { + while ((pw = RB_ROOT(l2vpn_pw_head, + &l2vpn->pw_inactive_tree)) != NULL) { QOBJ_UNREG(pw); RB_REMOVE(l2vpn_pw_head, &l2vpn->pw_inactive_tree, pw); free(pw); |