In message <[email protected]>, Geoff Simmons writes:

Just some nitpickery, fix and commit without further review:

>diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
>index 04aba0d..751a915 100644
>--- a/bin/varnishtest/vtc_main.c
>+++ b/bin/varnishtest/vtc_main.c
>@@ -85,6 +85,7 @@ static int vtc_verbosity = 1;                /* Verbosity 
>Level */
> static int vtc_good;
> static int vtc_fail;
> static int leave_temp;
>+static char *tmp;

Can we please call it "tmpdir" instead ?

>-      fprintf(stderr, FMT, "-l", "Leave /tmp/vtc.* if test fails");
>-      fprintf(stderr, FMT, "-L", "Always leave /tmp/vtc.*");
>+      fprintf(stderr, FMT, "-l", "Leave $TMPDIR/vtc.* if test fails");
>+      fprintf(stderr, FMT, "-L", "Always leave $TMPDIR/vtc.*");

I'd prefer to not give the impression TMPDIR is mandatory:

>+      fprintf(stderr, FMT, "-l", "Leave temporary vtc.* if test fails");
>+      fprintf(stderr, FMT, "-L", "Always leave temporary vtc.*");

(also in .rst files)


>       extmacro_def("varnishd", "varnishd"); /* Default to path lookup */
>+      tmp = strdup("/tmp");
>+      if (getenv("TMPDIR") != NULL)
>+              tmp = strdup(getenv("TMPDIR"));

Don't waste memory :-)

>+      if (getenv("TMPDIR") != NULL)
>+              tmp = strdup(getenv("TMPDIR"));
>+      else
>+              tmp = strdup("/tmp");

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to