[master] 607e189 -some must have a non-zero arg

Guillaume Quintard guillaume at varnish-software.com
Tue Feb 14 10:56:05 CET 2017


commit 607e189039187c878b364338626e993d40c03e19
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Tue Feb 14 10:13:29 2017 +0100

    -some must have a non-zero arg

diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index 614f197..aef46dd 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -2159,9 +2159,12 @@ cmd_rxcont(CMD_ARGS)
 	CAST_OBJ_NOTNULL(s, priv, STREAM_MAGIC);
 
 	while (*++av)
-		if (!strcmp(*av, "-some"))
-			STRTOU32_CHECK(times, av, p, vl, "-some", 0);
-		else if (!strcmp(*av, "-all"))
+		if (!strcmp(*av, "-some")) {
+			STRTOU32(times, *av, p, vl, "-some");
+			if (time <= 0)
+				vtc_fatal(vl, "-some argument must be more"
+					       "than 0 (found \"%s\")\n", *av);
+		} else if (!strcmp(*av, "-all"))
 			loop = 1;
 		else
 			break;



More information about the varnish-commit mailing list