]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/objects_build.c
tools/ccanlint: add global .valgrind_suppressions file.
[ccan] / tools / ccanlint / tests / objects_build.c
index cbb3189513c034094eec05d522c0e78fa247ec0e..d44b7e7464fd2410071697570fa9267a7de541bb 100644 (file)
@@ -1,7 +1,7 @@
 #include <tools/ccanlint/ccanlint.h>
 #include <tools/tools.h>
-#include <ccan/talloc/talloc.h>
 #include <ccan/str/str.h>
+#include <ccan/tal/path/path.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -36,12 +36,12 @@ void build_objects(struct manifest *m,
 
        list_for_each(&m->c_files, i, list) {
                char *output;
-               char *fullfile = talloc_asprintf(m, "%s/%s", m->dir, i->name);
+               char *fullfile = path_join(m, m->dir, i->name);
 
                i->compiled[ctype] = temp_file(m, "", fullfile);
                if (!compile_object(score, fullfile, ccan_dir, compiler, flags,
                                    i->compiled[ctype], &output)) {
-                       talloc_free(i->compiled[ctype]);
+                       tal_free(i->compiled[ctype]);
                        score_file_error(score, i, 0,
                                         "Compiling object files:\n%s",
                                         output);
@@ -58,7 +58,8 @@ void build_objects(struct manifest *m,
        if (!errors) {
                score->pass = true;
                score->score = score->total - warnings;
-       }
+       } else
+               build_failed = true;
 }
 
 static void check_objs_build(struct manifest *m,