r5032 - trunk/varnish-cache/lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Wed Jul 7 13:59:02 CEST 2010


Author: phk
Date: 2010-07-07 13:59:01 +0200 (Wed, 07 Jul 2010)
New Revision: 5032

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_parse.c
Log:
Minor polishing



Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_parse.c	2010-07-07 11:00:33 UTC (rev 5031)
+++ trunk/varnish-cache/lib/libvcl/vcc_parse.c	2010-07-07 11:59:01 UTC (rev 5032)
@@ -45,7 +45,7 @@
 /*--------------------------------------------------------------------*/
 
 static void vcc_Compound(struct vcc *tl);
-static void vcc_Cond_0(struct vcc *tl);
+static void vcc_Conditional(struct vcc *tl);
 
 /*--------------------------------------------------------------------*/
 
@@ -381,19 +381,15 @@
 
 	C(tl, ",");
 	if (tl->t->tok == '!') {
-		Fb(tl, 1, "!(\n");
+		Fb(tl, 1, "!");
 		vcc_NextToken(tl);
-	} else {
-		Fb(tl, 1, "(\n");
 	}
 	if (tl->t->tok == '(') {
-		vcc_NextToken(tl);
-		vcc_Cond_0(tl);
-		SkipToken(tl, ')');
-		Fb(tl, 1, ")\n");
+		vcc_Conditional(tl);
 		return;
 	}
 	if (tl->t->tok == ID) {
+		Fb(tl, 1, "(\n");
 		vcc_Cond_3(tl);
 		Fb(tl, 1, ")\n");
 		return;
@@ -418,6 +414,7 @@
 		vcc_NextToken(tl);
 		Fb(tl, 1, ") && (\n");
 		L(tl, vcc_Cond_2(tl));
+		ERRCHK(tl);
 	}
 	Fb(tl, 1, ")\n");
 }
@@ -432,6 +429,7 @@
 		vcc_NextToken(tl);
 		Fb(tl, 1, ") || (\n");
 		L(tl, vcc_Cond_1(tl));
+		ERRCHK(tl);
 	}
 	Fb(tl, 1, ")\n");
 }




More information about the varnish-commit mailing list