Lines Matching refs:successor
1997 * the successor. All the logic for finding
2659 dns_rbtnode_t *successor;
2698 * deleted. Find its immediate in-order successor and
2700 * old site of the successor.
2702 successor = RIGHT(item);
2703 while (LEFT(successor) != NULL) {
2704 successor = LEFT(successor);
2708 * The successor cannot possibly have a left child;
2711 if (RIGHT(successor) != NULL) {
2712 child = RIGHT(successor);
2717 * the value being deleted with that of the successor,
2725 * First, put the successor in the tree location of the
2728 * delete to the successor's old location.
2730 saved_parent = PARENT(successor);
2731 saved_right = RIGHT(successor);
2732 saved_color = COLOR(successor);
2735 *rootp = successor;
2736 successor->is_root = true;
2739 LEFT(PARENT(item)) = successor;
2741 RIGHT(PARENT(item)) = successor;
2744 PARENT(successor) = PARENT(item);
2745 LEFT(successor) = LEFT(item);
2746 RIGHT(successor) = RIGHT(item);
2747 COLOR(successor) = COLOR(item);
2749 if (LEFT(successor) != NULL) {
2750 PARENT(LEFT(successor)) = successor;
2752 if (RIGHT(successor) != successor) {
2753 PARENT(RIGHT(successor)) = successor;
2758 * successor's previous tree location.
2764 * Node being deleted was successor's parent.
2766 RIGHT(successor) = item;
2767 PARENT(item) = successor;
2774 * Original location of successor node has no left.
3481 dns_rbtnode_t *current, *successor;
3487 successor = NULL;
3508 successor = current;
3511 if (successor != NULL) {
3512 chain->end = successor;
3519 * in the megatree is a successor to that node, down at
3547 dns_rbtnode_t *current, *previous, *successor;
3552 successor = NULL;
3562 successor = current;
3573 successor = current;
3576 if (successor != NULL) {
3577 chain->end = successor;
3594 dns_rbtnode_t *current, *previous, *successor;
3600 successor = NULL;
3625 successor = current;
3628 * The successor is up, either in this level or a previous one.
3630 * that was via a left link; the successor is the node that has
3643 successor = current;
3648 if (successor == NULL) {
3663 * looking for a successor as we really
3677 } while (successor == NULL);
3680 if (successor == NULL && RIGHT(current) != NULL) {
3687 successor = current;
3690 if (successor != NULL) {
3692 * If we determine that the current node is the successor to
3695 INSIST(chain->end != successor);
3697 chain->end = successor;
3704 * in the megatree is a successor to that node, down at