[master] 063be1b Assert when an optarg is expected
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Sep 11 09:41:06 UTC 2017
commit 063be1b636088c32b87e53d7ea43a92b544c7a29
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Apr 25 09:41:59 2017 +0200
Assert when an optarg is expected
diff --git a/lib/libvarnishapi/vut.c b/lib/libvarnishapi/vut.c
index 355299e..26f5673 100644
--- a/lib/libvarnishapi/vut.c
+++ b/lib/libvarnishapi/vut.c
@@ -153,6 +153,7 @@ VUT_Arg(int opt, const char *arg)
return (1);
case 'g':
/* Grouping */
+ AN(arg);
return (VUT_g_Arg(arg));
case 'k':
/* Log transaction limit */
@@ -163,18 +164,22 @@ VUT_Arg(int opt, const char *arg)
return (1);
case 'n':
/* Varnish instance name */
+ AN(arg);
REPLACE(VUT.n_arg, arg);
return (1);
case 'P':
/* PID file */
+ AN(arg);
REPLACE(VUT.P_arg, arg);
return (1);
case 'q':
/* Query to use */
+ AN(arg);
REPLACE(VUT.q_arg, arg);
return (1);
case 'r':
/* Binary file input */
+ AN(arg);
REPLACE(VUT.r_arg, arg);
return (1);
case 't':
More information about the varnish-commit
mailing list