Slight cleanup for crcsync.c
[ccan] / ccan / list / _info.c
index 7061762fda6c8f7672de2d80b7db20b6ad87343b..003887c98cda687548218dbc45b75ab659e69504 100644 (file)
@@ -12,7 +12,9 @@
  *
  * Example:
  *     #include <err.h>
- *     #include "list/list.h"
+ *     #include <stdio.h>
+ *     #include <stdlib.h>
+ *     #include <ccan/list/list.h>
  *
  *     struct parent {
  *             const char *name;
@@ -35,7 +37,8 @@
  *                     errx(1, "Usage: %s parent children...", argv[0]);
  *
  *             p.name = argv[1];
- *             for (i = 2; i < argc, i++) {
+ *             list_head_init(&p.children);
+ *             for (i = 2; i < argc; i++) {
  *                     c = malloc(sizeof(*c));
  *                     c->name = argv[i];
  *                     list_add(&p.children, &c->list);