[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1239763784.10095.3.camel@myhost>
Date: Wed, 15 Apr 2009 10:49:44 +0800
From: fzhang <figo.zhang@...orific.com>
To: andrea@...e.de
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH]Documentation/rbtree.txt: cleanup kerneldoc of rbtree
The first parameter of the rb_link_node() is a 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@....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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists