X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Flist%2Flist.h;h=3496294b52c89acc65ac10f58398ff4e08bfe523;hp=9cb41abd8a339ba3880b5997390c4908aafe9020;hb=c44953a9b9e6114690968294662fc5120e674cd2;hpb=c906ef097b6af429d533b49c2773fec871eee817 diff --git a/ccan/list/list.h b/ccan/list/list.h index 9cb41abd..3496294b 100644 --- a/ccan/list/list.h +++ b/ccan/list/list.h @@ -106,8 +106,9 @@ static inline void list_head_init(struct list_head *h) * * The list_node does not need to be initialized; it will be overwritten. * Example: - * struct child *child; + * struct child *child = malloc(sizeof(*child)); * + * child->name = "marvin"; * list_add(&parent->children, &child->list); * parent->num_children++; */