aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfigo.zhang <figo.zhang@kolorific.com>2009-04-16 22:58:48 -0400
committerJiri Kosina <jkosina@suse.cz>2009-06-12 12:01:47 -0400
commit27af1da4b58675d5c6bacf9b7de9c2746687d272 (patch)
tree04ba17bbf2799812e018dcadbb7c38bcf0c6c653
parent19f594600110377ec4037fdf7fb93a25ec516212 (diff)
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: Figo.zhang <figo.zhang@kolorific.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--Documentation/rbtree.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
index 7224459b469e..77102148e67b 100644
--- a/Documentation/rbtree.txt
+++ b/Documentation/rbtree.txt
@@ -131,8 +131,8 @@ Example:
131 } 131 }
132 132
133 /* Add new node and rebalance tree. */ 133 /* Add new node and rebalance tree. */
134 rb_link_node(data->node, parent, new); 134 rb_link_node(&data->node, parent, new);
135 rb_insert_color(data->node, root); 135 rb_insert_color(&data->node, root);
136 136
137 return TRUE; 137 return TRUE;
138 } 138 }
@@ -146,10 +146,10 @@ To remove an existing node from a tree, call:
146 146
147Example: 147Example:
148 148
149 struct mytype *data = mysearch(mytree, "walrus"); 149 struct mytype *data = mysearch(&mytree, "walrus");
150 150
151 if (data) { 151 if (data) {
152 rb_erase(data->node, mytree); 152 rb_erase(&data->node, &mytree);
153 myfree(data); 153 myfree(data);
154 } 154 }
155 155