* [PATCH]Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txt
@ 2009-04-13 1:59 fzhang
0 siblings, 0 replies; only message in thread
From: fzhang @ 2009-04-13 1:59 UTC (permalink / raw)
To: rdunlap; +Cc: linux-kernel
The first parameter of the rb_link_node() is pointer, and the "node" is
define a struct (pls see line 67 and line 73 in the doc), so should use
"&data->node".
Signed-off-by: Figo.zhang <figo1802@126.com>
---
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
index 7224459..7710214 100644
--- a/Documentation/rbtree.txt
+++ b/Documentation/rbtree.txt
@@ -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;
}
@@ -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);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-13 2:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-13 1:59 [PATCH]Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txt fzhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.