[ccan] [PATCH] list: fix list element counting in provided example inside _info file
Vladimir Zapolskiy
vz at mleia.com
Wed Nov 23 11:08:10 EST 2011
This change initializes a counter of children, otherwise is may contain
arbitrary value.
Signed-off-by: Vladimir Zapolskiy <vz at mleia.com>
---
ccan/list/_info | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/ccan/list/_info b/ccan/list/_info
index 8b5bd9b..a30659c 100644
--- a/ccan/list/_info
+++ b/ccan/list/_info
@@ -38,6 +38,7 @@
*
* p.name = argv[1];
* list_head_init(&p.children);
+ * p.num_children = 0;
* for (i = 2; i < argc; i++) {
* c = malloc(sizeof(*c));
* c->name = argv[i];
--
1.7.5.4
More information about the ccan
mailing list