Commit 27af1da4 authored by figo.zhang's avatar figo.zhang Committed by Jiri Kosina

trivial: Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txt

 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: default avatarFigo.zhang <figo.zhang@kolorific.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 19f59460
...@@ -131,8 +131,8 @@ Example: ...@@ -131,8 +131,8 @@ Example:
} }
/* Add new node and rebalance tree. */ /* Add new node and rebalance tree. */
rb_link_node(data->node, parent, new); rb_link_node(&data->node, parent, new);
rb_insert_color(data->node, root); rb_insert_color(&data->node, root);
return TRUE; return TRUE;
} }
...@@ -146,10 +146,10 @@ To remove an existing node from a tree, call: ...@@ -146,10 +146,10 @@ To remove an existing node from a tree, call:
Example: Example:
struct mytype *data = mysearch(mytree, "walrus"); struct mytype *data = mysearch(&mytree, "walrus");
if (data) { if (data) {
rb_erase(data->node, mytree); rb_erase(&data->node, &mytree);
myfree(data); myfree(data);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment