[master] 2ac1163 Print usage on unknown or missing arguments
Federico G. Schwindt
fgsch at lodoss.net
Tue May 1 14:29:24 UTC 2018
commit 2ac116397eb8a34c0001cb705cf21316cb5056f0
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Mon Apr 30 21:13:23 2018 +0100
Print usage on unknown or missing arguments
This seems to be the de-facto way to handle such cases.
Fixes #2608.
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index cad50a4..aada3ce 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -488,8 +488,7 @@ main(int argc, char * const *argv)
do {
switch (o) {
case '?':
- if (optopt == '?')
- usage();
+ usage();
exit(2);
case 'V':
case 'x':
More information about the varnish-commit
mailing list