+2347. [bug] Delete now traverses the RB tree in the canonical
+ order. [RT #17451]
+
2345. [bug] named-checkconf failed to detect when forwarders
were set at both the options/view level and in
a root zone. [RT #17671]
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rbt.c,v 1.128.18.9 2008/01/22 23:27:05 tbox Exp $ */
+/* $Id: rbt.c,v 1.128.18.10 2008/03/31 13:32:59 fdupont Exp $ */
/*! \file */
node = LEFT(node);
goto traverse;
}
- if (RIGHT(node) != NULL) {
- node = RIGHT(node);
- goto traverse;
- }
if (DOWN(node) != NULL) {
node = DOWN(node);
goto traverse;
node->magic = 0;
#endif
parent = PARENT(node);
+ if (RIGHT(node) != NULL)
+ PARENT(RIGHT(node)) = parent;
if (parent != NULL) {
if (LEFT(parent) == node)
- LEFT(parent) = NULL;
+ LEFT(parent) = RIGHT(node);
else if (DOWN(parent) == node)
- DOWN(parent) = NULL;
- else if (RIGHT(parent) == node)
- RIGHT(parent) = NULL;
- }
+ DOWN(parent) = RIGHT(node);
+ } else
+ parent = RIGHT(node);
isc_mem_put(rbt->mctx, node, NODE_SIZE(node));
rbt->nodecount--;
node = parent;