static void rb_insert_case1(wmem_tree_t *tree, wmem_tree_node_t *node) { wmem_tree_node_t *parent = node->parent; if (parent == NULL) { node->color = WMEM_NODE_COLOR_BLACK; } else { rb_insert_case2(tree, node); } }
void rb_insert_case1(struct rb_tree_node *n) { if (n->parent) rb_insert_case2(n); else n->color = BLACK; }