Commit 4e443079 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't use tempnam(3) it results in a bogus compile time warning, because

we are not trying to create a file but a directory.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4749 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f3ca3ef6
......@@ -612,6 +612,7 @@ main(int argc, char * const *argv)
double tmax, t0, t00;
unsigned dur = 30;
const char *nmax;
char tmpdir[BUFSIZ];
char cmd[BUFSIZ];
setbuf(stdout, NULL);
......@@ -646,8 +647,8 @@ main(int argc, char * const *argv)
init_macro();
init_sema();
setenv("TMPDIR", "/tmp", 0);
vtc_tmpdir = tempnam(NULL, "vtc");
bprintf(tmpdir, "/tmp/vtc.%d.%08x", getpid(), (unsigned)random());
vtc_tmpdir = tmpdir;
AN(vtc_tmpdir);
AZ(mkdir(vtc_tmpdir, 0700));
macro_def(vltop, NULL, "tmpdir", vtc_tmpdir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment