Skip to content

Commit

Permalink
[RBTREE] Update key.c to use rb_parent() accessor macro.
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
dwmw2 committed Apr 21, 2006
1 parent 52b5108 commit fed306f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions security/keys/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ static inline void key_alloc_serial(struct key *key)
key->serial = 2;
key_serial_next = key->serial + 1;

if (!parent->rb_parent)
if (!rb_parent(parent))
p = &key_serial_tree.rb_node;
else if (parent->rb_parent->rb_left == parent)
p = &parent->rb_parent->rb_left;
else if (rb_parent(parent)->rb_left == parent)
p = &(rb_parent(parent)->rb_left);
else
p = &parent->rb_parent->rb_right;
p = &(rb_parent(parent)->rb_right);

parent = rb_next(parent);
if (!parent)
Expand Down

0 comments on commit fed306f

Please sign in to comment.