Commit c44953a9 authored by Rusty Russell's avatar Rusty Russell

list: fix uninitialized variable in list_add example.

gcc with optimization complained (correctly) about this.
parent c906ef09
......@@ -106,8 +106,9 @@ static inline void list_head_init(struct list_head *h)
*
* The list_node does not need to be initialized; it will be overwritten.
* Example:
* struct child *child;
* struct child *child = malloc(sizeof(*child));
*
* child->name = "marvin";
* list_add(&parent->children, &child->list);
* parent->num_children++;
*/
......
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