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:
David Lawrence 2000-05-19 05:58:48 +00:00
parent 092b4e5359
commit fccb3e6c67

View file

@ -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));