From: Vladimir Zapolskiy Date: Tue, 22 Nov 2011 23:58:15 +0000 (+0200) Subject: list: fix list element counting in provided example inside _info file X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=bc771e48f57e2f2cefdce9c03698e2c19345bc10;ds=sidebyside list: fix list element counting in provided example inside _info file This change initializes a counter of children, otherwise is may contain arbitrary value. Signed-off-by: Vladimir Zapolskiy --- diff --git a/ccan/list/_info b/ccan/list/_info index 8b5bd9b5..a30659c1 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];