Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27938
b: refs/heads/master
c: 1975e59
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse committed Apr 21, 2006
1 parent ecbcea8 commit 099325b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21f1d5fc592e145574dede8debe9603334d08fde
refs/heads/master: 1975e59375756da4ff4e6e7d12f67485e813ace0
15 changes: 5 additions & 10 deletions trunk/lib/rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,18 +243,13 @@ void rb_erase(struct rb_node *node, struct rb_root *root)

if (child)
child->rb_parent = parent;
if (parent)
{
if (parent->rb_left == node)
parent->rb_left = child;
else
parent->rb_right = child;
}
else
root->rb_node = child;

if (node->rb_parent == old)
if (node->rb_parent == old) {
parent->rb_right = child;
parent = node;
} else
parent->rb_left = child;

node->rb_parent = old->rb_parent;
node->rb_color = old->rb_color;
node->rb_right = old->rb_right;
Expand Down

0 comments on commit 099325b

Please sign in to comment.