X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Favoids_cpp_reserved.c;h=78ba6ca8b87fbecdbd7a23db1593d424f537ae22;hp=e094f270b1461bdfa80512e38b62fb9295719117;hb=dc8042b42500f79f613b1197df6cdf739615a89f;hpb=10e5e329a1a8804ff6461e1724071364cf6be572 diff --git a/tools/ccanlint/tests/avoids_cpp_reserved.c b/tools/ccanlint/tests/avoids_cpp_reserved.c index e094f270..78ba6ca8 100644 --- a/tools/ccanlint/tests/avoids_cpp_reserved.c +++ b/tools/ccanlint/tests/avoids_cpp_reserved.c @@ -1,7 +1,5 @@ #include #include -#include -#include #include #include #include @@ -52,7 +50,7 @@ static void check_headers_no_cpp(struct manifest *m, if (fd < 0) err(1, "Creating temporary file %s", tmpsrc); - contents = talloc_asprintf(tmpsrc, + contents = tal_fmt(tmpsrc, "#define alignas #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n" "#define class #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n" "#define constexpr #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n" @@ -94,7 +92,7 @@ static void check_headers_no_cpp(struct manifest *m, tmpobj, &cmdout)) { score->score = score->total; } else { - score->error = talloc_asprintf(score, + score->error = tal_fmt(score, "Main header file with C++ names:\n%s", cmdout); }