X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fmodule_links.c;h=5c25e6126589ebd0cadd01d15b4fd66e8a18e11c;hb=932d65dd6537250e617516749f03a00fea3b34f6;hp=d665ba7d6672f7a86849f6683686e6bb83fa42a3;hpb=199023653cd6020218fbc4d0712591fc7ee0c5e1;p=ccan diff --git a/tools/ccanlint/tests/module_links.c b/tools/ccanlint/tests/module_links.c index d665ba7d..5c25e612 100644 --- a/tools/ccanlint/tests/module_links.c +++ b/tools/ccanlint/tests/module_links.c @@ -58,10 +58,9 @@ static void check_use_build(struct manifest *m, { char *contents; char *tmpfile, *cmdout; - char *basename = talloc_asprintf(m, "%s/example.c", m->dir); int fd; - tmpfile = temp_file(m, ".c", basename); + tmpfile = temp_file(m, ".c", "example.c"); fd = open(tmpfile, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fd < 0) @@ -73,7 +72,7 @@ static void check_use_build(struct manifest *m, "{\n" " return 0;\n" "}\n", - m->basename, m->basename); + m->modname, m->basename); if (write(fd, contents, strlen(contents)) != strlen(contents)) err(1, "Failure writing to temporary file %s", tmpfile); close(fd);