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

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:38 UTC 2018


commit 43f1ca560f12ed49d126c85d58574d765f21d007
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 0dbe46fc0..1bbf13732 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