diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-19 17:27:55 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-19 17:27:55 -0400 | 
| commit | d368cd48b94cb9a22b9733200d8cfd94c71338ce (patch) | |
| tree | 5b8d5a6bcd026fac8bffad24fece194df9bf7232 /ldpd/ldp_vty_conf.c | |
| parent | 2dc1ef552b453d9e2b31599ca8d4c065dc2ccbfc (diff) | |
| parent | b19ad86195435f6ef84ebf0303ba03d8f79cd7fc (diff) | |
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 c96e69a6c5..532c880afc 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);  | 
