X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fobjects_build_with_stringchecks.c;h=1e99c100c1ce8725b4964d0e66b0d1f10c173854;hb=bdb8d75154d7aefe01788e5dd5adb11e3c943c11;hp=c2fe1b6cc7c519e52d920ae5df14c510e8f42072;hpb=10e5e329a1a8804ff6461e1724071364cf6be572;p=ccan diff --git a/tools/ccanlint/tests/objects_build_with_stringchecks.c b/tools/ccanlint/tests/objects_build_with_stringchecks.c index c2fe1b6c..1e99c100 100644 --- a/tools/ccanlint/tests/objects_build_with_stringchecks.c +++ b/tools/ccanlint/tests/objects_build_with_stringchecks.c @@ -1,8 +1,6 @@ #include #include -#include #include -#include #include #include #include @@ -26,7 +24,7 @@ static const char *uses_stringfuncs(struct manifest *m) char *match; list_for_each(list, i, list) { - if (strreg(m, get_ccan_file_contents(i), + if (tal_strreg(m, get_ccan_file_contents(i), "(isalnum|isalpha|isascii|isblank|iscntrl" "|isdigit|isgraph|islower|isprint|ispunct" "|isspace|isupper|isxdigit" @@ -103,7 +101,7 @@ static void build_objects_with_stringchecks(struct manifest *m, int tmpfd; /* FIXME:: We need -I so local #includes work outside normal dir. */ - flags = talloc_asprintf(score, "-I%s %s", m->dir, cflags); + flags = tal_fmt(score, "-I%s %s", m->dir, cflags); /* Won't work into macros, but will get inline functions. */ if (list_empty(&m->c_files)) { @@ -111,8 +109,8 @@ static void build_objects_with_stringchecks(struct manifest *m, i = get_main_header(m); tmp = temp_file(score, ".c", i->fullname); tmpfd = start_file(tmp); - line = talloc_asprintf(score, "#include \n", - m->modname, m->basename); + line = tal_fmt(score, "#include \n", + m->modname, m->basename); write_str(tmpfd, line); close(tmpfd); test_compile(score, i, tmp, flags, &errors, &warnings);