r4656 - trunk/varnish-cache/lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Tue Apr 13 11:06:37 CEST 2010


Author: phk
Date: 2010-04-13 11:06:37 +0200 (Tue, 13 Apr 2010)
New Revision: 4656

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_acl.c
   trunk/varnish-cache/lib/libvcl/vcc_action.c
   trunk/varnish-cache/lib/libvcl/vcc_backend.c
   trunk/varnish-cache/lib/libvcl/vcc_dir_random.c
   trunk/varnish-cache/lib/libvcl/vcc_parse.c
   trunk/varnish-cache/lib/libvcl/vcc_var.c
Log:
Make vcc_UintVal() behave like the other ..Val() functions and
consume its token.



Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_acl.c	2010-04-13 07:41:08 UTC (rev 4655)
+++ trunk/varnish-cache/lib/libvcl/vcc_acl.c	2010-04-13 09:06:37 UTC (rev 4656)
@@ -306,7 +306,6 @@
 		ae->t_mask = tl->t;
 		ExpectErr(tl, CNUM);
 		ae->mask = vcc_UintVal(tl);
-		vcc_NextToken(tl);
 	}
 
 	if (ae->para) 

Modified: trunk/varnish-cache/lib/libvcl/vcc_action.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_action.c	2010-04-13 07:41:08 UTC (rev 4655)
+++ trunk/varnish-cache/lib/libvcl/vcc_action.c	2010-04-13 09:06:37 UTC (rev 4656)
@@ -80,7 +80,6 @@
 		}
 	} else if (tl->t->tok == CNUM) {
 		Fb(tl, 1, "VRT_error(sp, %u", vcc_UintVal(tl));
-		vcc_NextToken(tl);
 	} else
 		Fb(tl, 1, "VRT_error(sp, 0");
 	if (tl->t->tok == CSTR) {

Modified: trunk/varnish-cache/lib/libvcl/vcc_backend.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_backend.c	2010-04-13 07:41:08 UTC (rev 4655)
+++ trunk/varnish-cache/lib/libvcl/vcc_backend.c	2010-04-13 09:06:37 UTC (rev 4656)
@@ -304,12 +304,10 @@
 		} else if (vcc_IdIs(t_field, "window")) {
 			t_window = tl->t;
 			window = vcc_UintVal(tl);
-			vcc_NextToken(tl);
 			ERRCHK(tl);
 		} else if (vcc_IdIs(t_field, "initial")) {
 			t_initial = tl->t;
 			initial = vcc_UintVal(tl);
-			vcc_NextToken(tl);
 			ERRCHK(tl);
 		} else if (vcc_IdIs(t_field, "expected_response")) {
 			status = vcc_UintVal(tl);
@@ -320,12 +318,10 @@
 				vcc_ErrWhere(tl, tl->t);
 				return;
 			}
-			vcc_NextToken(tl);
 			ERRCHK(tl);
 		} else if (vcc_IdIs(t_field, "threshold")) {
 			t_threshold = tl->t;
 			threshold = vcc_UintVal(tl);
-			vcc_NextToken(tl);
 			ERRCHK(tl);
 		} else {
 			vcc_ErrToken(tl, t_field);
@@ -482,7 +478,6 @@
 			SkipToken(tl, ';');
 		} else if (vcc_IdIs(t_field, "max_connections")) {
 			u = vcc_UintVal(tl);
-			vcc_NextToken(tl);
 			ERRCHK(tl);
 			SkipToken(tl, ';');
 			Fb(tl, 0, "\t.max_connections = %u,\n", u);
@@ -498,7 +493,6 @@
 				vsb_printf(tl->sb, " at\n");
 				vcc_ErrWhere(tl, tl->t);
 			}
-			vcc_NextToken(tl);
 			ERRCHK(tl);
 			saint = u;
 			SkipToken(tl, ';');

Modified: trunk/varnish-cache/lib/libvcl/vcc_dir_random.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_dir_random.c	2010-04-13 07:41:08 UTC (rev 4655)
+++ trunk/varnish-cache/lib/libvcl/vcc_dir_random.c	2010-04-13 09:06:37 UTC (rev 4656)
@@ -69,7 +69,6 @@
 			ExpectErr(tl, CNUM);
 			retries = vcc_UintVal(tl);
 			ERRCHK(tl);
-			vcc_NextToken(tl);
 			SkipToken(tl, ';');
 		} else {
 			ErrInternal(tl);
@@ -113,7 +112,6 @@
 					return;
 				}
 				Fc(tl, 0, "%s .weight = %u", first, u);
-				vcc_NextToken(tl);
 				SkipToken(tl, ';');
 			} else {
 				ErrInternal(tl);

Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_parse.c	2010-04-13 07:41:08 UTC (rev 4655)
+++ trunk/varnish-cache/lib/libvcl/vcc_parse.c	2010-04-13 09:06:37 UTC (rev 4656)
@@ -137,6 +137,7 @@
 		d *= 10;
 		d += *p - '0';
 	}
+	vcc_NextToken(tl);
 	return (d);
 }
 

Modified: trunk/varnish-cache/lib/libvcl/vcc_var.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_var.c	2010-04-13 07:41:08 UTC (rev 4655)
+++ trunk/varnish-cache/lib/libvcl/vcc_var.c	2010-04-13 09:06:37 UTC (rev 4656)
@@ -133,7 +133,6 @@
 		Fb(tl, 0, "%g", vcc_DoubleVal(tl));
 	} else if (vp->fmt == INT) { 
 		Fb(tl, 0, "%u", vcc_UintVal(tl));
-		vcc_NextToken(tl);
 	} else {
 		AN(vt);
 		vsb_printf(tl->sb,




More information about the varnish-commit mailing list