X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Ftests_compile_coverage.c;h=ed9f4ce659ce28326c010e626fbed9bec9cae072;hp=9e13ad938a403f2d25f15c78d91e05e931e4bc98;hb=e0529e15e0c7f9251af5465ef03f208d279affc1;hpb=453fdc02ce54ff965f9971a3bfd0e1a79b6c98f9 diff --git a/tools/ccanlint/tests/tests_compile_coverage.c b/tools/ccanlint/tests/tests_compile_coverage.c index 9e13ad93..ed9f4ce6 100644 --- a/tools/ccanlint/tests/tests_compile_coverage.c +++ b/tools/ccanlint/tests/tests_compile_coverage.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -25,7 +24,7 @@ static const char *can_run_coverage(struct manifest *m) char *output; if (!run_command(m, &timeleft, &output, "gcov -h")) - return talloc_asprintf(m, "No gcov support: %s", output); + return tal_fmt(m, "No gcov support: %s", output); return NULL; #else return "No coverage support for this compiler"; @@ -38,7 +37,7 @@ static void cov_compile(const void *ctx, struct ccan_file *file, bool link_with_module) { - char *flags = talloc_asprintf(ctx, "%s %s", cflags, COVERAGE_CFLAGS); + char *flags = tal_fmt(ctx, "%s %s", cflags, COVERAGE_CFLAGS); file->compiled[COMPILE_COVERAGE] = temp_file(ctx, "", file->fullname); compile_and_link_async(file, time_ms, file->fullname, ccan_dir, @@ -59,13 +58,13 @@ static void do_compile_coverage_tests(struct manifest *m, struct ccan_file *i; struct list_head *h; bool ok; - char *f = talloc_asprintf(score, "%s %s", cflags, COVERAGE_CFLAGS); + char *f = tal_fmt(score, "%s %s", cflags, COVERAGE_CFLAGS); /* For API tests, we need coverage version of module. */ if (!list_empty(&m->api_tests)) { build_objects(m, score, f, COMPILE_COVERAGE); if (!score->pass) { - score->error = talloc_strdup(score, + score->error = tal_strdup(score, "Failed to compile module objects with coverage"); return; }