r4304 - branches/2.0/varnish-cache/lib/libvcl

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Oct 8 16:04:08 CEST 2009


Author: tfheen
Date: 2009-10-08 16:04:07 +0200 (Thu, 08 Oct 2009)
New Revision: 4304

Modified:
   branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c
Log:
Merge r4186: Make string comparisons against other than string literals possible.



Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-10-08 13:58:25 UTC (rev 4303)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-10-08 14:04:07 UTC (rev 4304)
@@ -235,8 +235,8 @@
 	vsb_cat(sb, " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWI");
 	vsb_cat(sb, "SE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFT");
 	vsb_cat(sb, "WARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n");
-	vsb_cat(sb, " * SUCH DAMAGE.\n *\n * $Id: vrt.h 3724 2009-02-10 14:");
-	vsb_cat(sb, "58:17Z tfheen $\n *\n * Runtime support for compiled V");
+	vsb_cat(sb, " * SUCH DAMAGE.\n *\n * $Id: vrt.h 4303 2009-10-08 13:");
+	vsb_cat(sb, "58:25Z tfheen $\n *\n * Runtime support for compiled V");
 	vsb_cat(sb, "CL programs.\n *\n * XXX: When this file is changed, l");
 	vsb_cat(sb, "ib/libvcl/vcc_gen_fixed_token.tcl\n");
 	vsb_cat(sb, " * XXX: *MUST* be rerun.\n */\n");

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c	2009-10-08 13:58:25 UTC (rev 4303)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c	2009-10-08 14:04:07 UTC (rev 4304)
@@ -263,10 +263,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