ccanlint: more heuristics for compiling examples.
[ccan] / tools / ccanlint / tests / has_examples.c
index 22d18e9d5a1440004c341d2bde93f3b735707a7b..d5f32795af44ef20da241b5f4b8453e52be0b35b 100644 (file)
@@ -32,7 +32,7 @@ static char *add_example(struct manifest *m, struct ccan_file *source,
                                               example->function));
        f = new_ccan_file(m, talloc_dirname(m, name), talloc_basename(m, name));
        talloc_steal(f, name);
                                               example->function));
        f = new_ccan_file(m, talloc_dirname(m, name), talloc_basename(m, name));
        talloc_steal(f, name);
-       list_add(&m->examples, &f->list);
+       list_add_tail(&m->examples, &f->list);
 
        fd = open(f->fullname, O_WRONLY | O_CREAT | O_EXCL, 0600);
        if (fd < 0)
 
        fd = open(f->fullname, O_WRONLY | O_CREAT | O_EXCL, 0600);
        if (fd < 0)