[master] 8d5752d Fix error handling code and typo when parsing -IX flags
Martin Blix Grydeland
martin at varnish-cache.org
Wed Oct 2 13:13:25 CEST 2013
commit 8d5752d0e5cd6284ebc37e913c3d201a48f5965a
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Oct 2 13:01:35 2013 +0200
Fix error handling code and typo when parsing -IX flags
Spotted by: Coverity
diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c
index 7795165..6babd06 100644
--- a/lib/libvarnishapi/vsl_arg.c
+++ b/lib/libvarnishapi/vsl_arg.c
@@ -278,7 +278,7 @@ vsl_IX_arg(struct VSL_data *vsl, int opt, const char *arg)
return (vsl_diag(vsl,
"-%c: \"%*.*s\" is ambiguous",
(char)opt, l, l, b));
- else if (i == 3)
+ else if (i <= -3)
return (vsl_diag(vsl,
"-%c: Syntax error in \"%*.*s\"",
(char)opt, l, l, b));
More information about the varnish-commit
mailing list