mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-12 05:32:42 -04:00
When joining nodes, set parent pointers of the left and right children of
the upper node (if they exist) to point to the new node.
This commit is contained in:
parent
092b4e5359
commit
fccb3e6c67
1 changed files with 6 additions and 2 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rbt.c,v 1.80 2000/05/19 04:42:08 tale Exp $ */
|
||||
/* $Id: rbt.c,v 1.81 2000/05/19 05:58:48 tale Exp $ */
|
||||
|
||||
/* Principal Authors: DCL */
|
||||
|
||||
|
|
@ -1365,8 +1365,12 @@ join_nodes(dns_rbt_t *rbt, dns_rbtnode_t *node) {
|
|||
else
|
||||
RIGHT(PARENT(node)) = newnode;
|
||||
|
||||
if (LEFT(node) != NULL)
|
||||
PARENT(LEFT(node)) = newnode;
|
||||
if (RIGHT(node) != NULL)
|
||||
PARENT(RIGHT(node)) = newnode;
|
||||
if (DOWN(down) != NULL)
|
||||
PARENT(DOWN(down)) = newnode;
|
||||
PARENT(DOWN(down)) = newnode;
|
||||
|
||||
isc_mem_put(rbt->mctx, node, NODE_SIZE(node));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue