Browse Source

tal: neaten child property initialization.

Don't open-code the list_head_init: left over from performance
debugging.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell 13 years ago
parent
commit
6c2ae3766a
1 changed files with 1 additions and 2 deletions
  1. 1 2
      ccan/tal/tal.c

+ 1 - 2
ccan/tal/tal.c

@@ -317,8 +317,7 @@ static bool add_child(struct tal_hdr *parent, struct tal_hdr *child)
 		children = add_child_property(parent, child);
 		children = add_child_property(parent, child);
 		if (!children)
 		if (!children)
 			return false;
 			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 links to itself. */
                 child->next = child;
                 child->next = child;