Lines Matching refs:right
90 while (node->right)
91 node = node->right;
119 assert(u == p->right);
120 p->right = v;
129 assert(x && x->right);
131 struct rb_node *y = x->right;
132 x->right = y->left;
146 y->left = x->right;
147 if (x->right)
148 rb_node_set_parent(x->right, y);
150 x->right = y;
172 assert(parent->right == NULL);
173 parent->right = node;
181 assert(z == z_p->left || z == z_p->right);
185 struct rb_node *y = z_p_p->right;
192 if (z == z_p->right) {
197 assert(z == z_p->left || z == z_p->right);
217 assert(z == z_p->left || z == z_p->right);
239 x = z->right;
242 } else if (z->right == NULL) {
247 /* Find the minimum sub-node of z->right */
248 y = rb_node_minimum(z->right);
251 x = y->right;
257 y->right = z->right;
258 rb_node_set_parent(y->right, y);
267 assert(x_p == NULL || x == x_p->left || x == x_p->right);
275 struct rb_node *w = x_p->right;
281 w = x_p->right;
283 if (rb_node_is_black(w->left) && rb_node_is_black(w->right)) {
287 if (rb_node_is_black(w->right)) {
291 w = x_p->right;
295 rb_node_set_black(w->right);
305 assert(x == x_p->right);
308 if (rb_node_is_black(w->right) && rb_node_is_black(w->left)) {
313 rb_node_set_black(w->right);
346 if (node->right) {
347 /* If we have a right child, then the next thing (compared to this
348 * node) is the left-most child of our right child.
350 return rb_node_minimum(node->right);
352 /* If node doesn't have a right child, crawl back up the to the
353 * left until we hit a parent to the right.
356 while (p && node == p->right) {
370 * this node) is the right-most child of our left child.
375 * right until we hit a parent to the left.
382 assert(p == NULL || node == p->right);
399 assert(rb_node_is_black(n->right));
403 validate_rb_node(n->right, black_depth);