]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/examples_compile.c
ccanlint: -k should not pollute module directory.
[ccan] / tools / ccanlint / tests / examples_compile.c
index 1ccc620248cadd3b0723de8ee01fcbef8732e687..8ab806438f1b4aab25e033cda63fca6915017e0c 100644 (file)
@@ -122,6 +122,9 @@ static bool compile(const void *ctx,
        if (!compile_and_link(ctx, file->fullname, ccan_dir,
                              obj_list(m, file),
                              "", lib_list(m), file->compiled, output)) {
+               /* Don't keep failures. */
+               if (keep)
+                       unlink(file->compiled);
                talloc_free(file->compiled);
                file->compiled = NULL;
                return false;