tal: neaten child property initialization.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 19 Nov 2012 00:14:29 +0000 (10:44 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 19 Nov 2012 00:14:29 +0000 (10:44 +1030)
Don't open-code the list_head_init: left over from performance
debugging.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/tal/tal.c

index 32cfd0433a395982e4158851bd10c7d73b5c8682..9fed477fe9595bd4e85d5243f1315c602915a830 100644 (file)
@@ -317,8 +317,7 @@ static bool add_child(struct tal_hdr *parent, struct tal_hdr *child)
                children = add_child_property(parent, child);
                if (!children)
                        return false;
                children = add_child_property(parent, child);
                if (!children)
                        return false;
-               children->group.list.n.next = children->group.list.n.prev
-                       = &children->group.list.n;
+               list_head_init(&children->group.list);
 
                /* Child links to itself. */
                 child->next = child;
 
                /* Child links to itself. */
                 child->next = child;