]> git.ozlabs.org Git - ccan/blobdiff - tools/depends.c
ccanlint: make compile commands return output.
[ccan] / tools / depends.c
index e2666d97f778ae2007127561b22415117cba9875..4bac1b063fbcb1cdc5aea75ed3b543d8ebe9fb53 100644 (file)
@@ -39,7 +39,7 @@ lines_from_cmd(const void *ctx, unsigned int *num, char *format, ...)
  * temp_file helps here. */
 static char *compile_info(const void *ctx, const char *dir)
 {
-       char *info_c_file, *info, *ccandir, *compiled;
+       char *info_c_file, *info, *ccandir, *compiled, *output;
        size_t len;
        int fd;
 
@@ -63,9 +63,9 @@ static char *compile_info(const void *ctx, const char *dir)
 
        compiled = maybe_temp_file(ctx, "", false, "info");
        if (compile_and_link(ctx, info_c_file, ccandir, "", "", "",
-                            compiled))
-               return NULL;
-       return compiled;
+                            compiled, &output))
+               return compiled;
+       return NULL;
 }
 
 static char **get_one_deps(const void *ctx, const char *dir,