]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/compile_test_helpers.c
ccanlint: make compile commands return output.
[ccan] / tools / ccanlint / tests / compile_test_helpers.c
index e2e3ed843f82a9477da9a2ffef48179e1aea19a7..3d5a8a74548a3c83f9213d4ae8a7fedac1e4b23a 100644 (file)
@@ -25,9 +25,14 @@ static char *compile(struct manifest *m,
                     bool keep,
                     struct ccan_file *cfile)
 {
+       char *output;
        cfile->compiled = maybe_temp_file(m, ".o", keep, cfile->fullname);
-       return compile_object(m, cfile->fullname, ccan_dir, "",
-                             cfile->compiled);
+       if (compile_object(m, cfile->fullname, ccan_dir, "",
+                          cfile->compiled, &output)) {
+               talloc_free(output);
+               return NULL;
+       }
+       return output;
 }
 
 static void do_compile_test_helpers(struct manifest *m,