Skip to contentSkip to conversation

Documentation/rbtree.txt: cleanup kerneldoc of rbtree

PATCH New fzhang 1 participant 1 message Apr 15, 2009 Documentation

lore
Share & tools
lore

fzhang

author
#0 lore raw

PATCH 1/1 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".

---

Documentation/rbtree.txt +4 -4
index 7224459..7710214 100644
@@ -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);
   }