X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fbuild_objs.c;h=e0ea222350bc981ed3075270a0db3ee7459cf1f1;hb=3612661714e86333ceacca7314959a5ed938dc6a;hp=d932ec74a36145db6e69fba006d639654fbc03bb;hpb=156dfda864bc2a0fe2ba63f69c22864b2348876f;p=ccan diff --git a/tools/ccanlint/tests/build_objs.c b/tools/ccanlint/tests/build_objs.c index d932ec74..e0ea2223 100644 --- a/tools/ccanlint/tests/build_objs.c +++ b/tools/ccanlint/tests/build_objs.c @@ -23,15 +23,14 @@ static const char *can_build(struct manifest *m) static bool compile_obj(struct ccan_file *c_file, char *objfile, char **report) { - char *contents; + char *err; - contents = run_command(objfile, "cc " CFLAGS " -o %s -c %s", - objfile, c_file->name); - if (contents) { + err = compile_object(objfile, objfile, c_file->name); + if (err) { if (*report) - *report = talloc_append_string(*report, contents); + *report = talloc_append_string(*report, err); else - *report = contents; + *report = err; return false; } return true;