Skip to content

Commit

Permalink
trivial: Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txt
Browse files Browse the repository at this point in the history
 The first formal parameter of the rb_link_node() is a pointer, and the
 "node" is define a data struct (pls see line 67 and line 73 in the
 doc), so the actual parameter should use "&data->node".

Signed-off-by: Figo.zhang <figo.zhang@kolorific.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
figo.zhang authored and Jiri Kosina committed Jun 12, 2009
1 parent 19f5946 commit 27af1da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Documentation/rbtree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ Example:
}

/* Add new node and rebalance tree. */
rb_link_node(data->node, parent, new);
rb_insert_color(data->node, root);
rb_link_node(&data->node, parent, new);
rb_insert_color(&data->node, root);

return TRUE;
}
Expand All @@ -146,10 +146,10 @@ To remove an existing node from a tree, call:

Example:

struct mytype *data = mysearch(mytree, "walrus");
struct mytype *data = mysearch(&mytree, "walrus");

if (data) {
rb_erase(data->node, mytree);
rb_erase(&data->node, &mytree);
myfree(data);
}

Expand Down

0 comments on commit 27af1da

Please sign in to comment.