X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fcompile_tests.c;h=3549cdedf6611c0ce33bf4866b767a25de018e11;hb=03a596908b779bbb4b7c2f739c5e238f8c5d6390;hp=b54ce958529f5e0a278f0d1f1e054abc4cbde54a;hpb=f1c96e9df6efed3c7a8d43495f1aa0bef6b5cefd;p=ccan-lca-2011.git diff --git a/tools/ccanlint/tests/compile_tests.c b/tools/ccanlint/tests/compile_tests.c index b54ce95..3549cde 100644 --- a/tools/ccanlint/tests/compile_tests.c +++ b/tools/ccanlint/tests/compile_tests.c @@ -71,14 +71,14 @@ static char *compile(const void *ctx, char *errmsg; file->compiled = maybe_temp_file(ctx, "", keep, file->fullname); - errmsg = compile_and_link(ctx, file->fullname, ccan_dir, - obj_list(m, link_with_module), - fail ? "-DFAIL" : "", - lib_list(m), file->compiled); - if (errmsg) { + if (!compile_and_link(ctx, file->fullname, ccan_dir, + obj_list(m, link_with_module), + fail ? "-DFAIL" : "", + lib_list(m), file->compiled, &errmsg)) { talloc_free(file->compiled); return errmsg; } + talloc_free(errmsg); return NULL; }