From bc771e48f57e2f2cefdce9c03698e2c19345bc10 Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Wed, 23 Nov 2011 01:58:15 +0200 Subject: [PATCH] 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 --- ccan/list/_info | 1 + 1 file changed, 1 insertion(+) 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]; -- 2.39.2