r4186 - trunk/varnish-cache/lib/libvcl
phk at projects.linpro.no
phk at projects.linpro.no
Mon Aug 17 14:27:11 CEST 2009
Author: phk
Date: 2009-08-17 14:27:11 +0200 (Mon, 17 Aug 2009)
New Revision: 4186
Modified:
trunk/varnish-cache/lib/libvcl/vcc_parse.c
Log:
Make string comparisons against other than string literals possible.
Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_parse.c 2009-08-17 11:53:01 UTC (rev 4185)
+++ trunk/varnish-cache/lib/libvcl/vcc_parse.c 2009-08-17 12:27:11 UTC (rev 4186)
@@ -235,10 +235,11 @@
Fb(tl, 1, "%sVRT_strcmp(%s, ",
tl->t->tok == T_EQ ? "!" : "", vp->rname);
vcc_NextToken(tl);
- ExpectErr(tl, CSTR);
- EncToken(tl->fb, tl->t);
+ if (!vcc_StringVal(tl)) {
+ vcc_ExpectedStringval(tl);
+ break;
+ }
Fb(tl, 0, ")\n");
- vcc_NextToken(tl);
break;
default:
Fb(tl, 1, "%s != (void*)0\n", vp->rname);
More information about the varnish-commit
mailing list