projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c906ef0
)
list: fix uninitialized variable in list_add example.
author
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 10 Nov 2010 06:37:29 +0000
(17:07 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 10 Nov 2010 06:37:29 +0000
(17:07 +1030)
gcc with optimization complained (correctly) about this.
ccan/list/list.h
patch
|
blob
|
history
diff --git
a/ccan/list/list.h
b/ccan/list/list.h
index 9cb41abd8a339ba3880b5997390c4908aafe9020..3496294b52c89acc65ac10f58398ff4e08bfe523 100644
(file)
--- a/
ccan/list/list.h
+++ b/
ccan/list/list.h
@@
-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++;
*/