[master] 5545e60 Specifying the process->spec twice in one line is almost certainly an error, so make it one.

Poul-Henning Kamp phk at FreeBSD.org
Fri Apr 6 19:40:11 UTC 2018


commit 5545e602918df430f4c3de84c7b5ddc29d469a39
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Apr 6 19:38:22 2018 +0000

    Specifying the process->spec twice in one line is
    almost certainly an error, so make it one.

diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c
index 0dbe46f..1bbf137 100644
--- a/bin/varnishtest/vtc_process.c
+++ b/bin/varnishtest/vtc_process.c
@@ -859,6 +859,7 @@ cmd_process(CMD_ARGS)
 	struct process *p, *p2;
 	uintmax_t u, v;
 	unsigned lin,col;
+	int spec_set = 0;
 
 	(void)priv;
 	(void)cmd;
@@ -1009,9 +1010,10 @@ cmd_process(CMD_ARGS)
 			av++;
 			continue;
 		}
-		if (**av == '-')
+		if (**av == '-' || spec_set)
 			vtc_fatal(p->vl, "Unknown process argument: %s",
 			    *av);
 		REPLACE(p->spec, *av);
+		spec_set = 1;
 	}
 }


More information about the varnish-commit mailing list