r4749 - trunk/varnish-cache/bin/varnishtest
phk at varnish-cache.org
phk at varnish-cache.org
Fri Apr 30 09:53:38 CEST 2010
Author: phk
Date: 2010-04-30 09:53:38 +0200 (Fri, 30 Apr 2010)
New Revision: 4749
Modified:
trunk/varnish-cache/bin/varnishtest/vtc.c
Log:
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.
Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c 2010-04-30 07:17:07 UTC (rev 4748)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c 2010-04-30 07:53:38 UTC (rev 4749)
@@ -612,6 +612,7 @@
double tmax, t0, t00;
unsigned dur = 30;
const char *nmax;
+ char tmpdir[BUFSIZ];
char cmd[BUFSIZ];
setbuf(stdout, NULL);
@@ -646,8 +647,8 @@
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);
More information about the varnish-commit
mailing list