Commit 35d81961 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make vcc_UintVal() behave like the other ..Val() functions and

consume its token.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4656 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 02eab5d8
......@@ -306,7 +306,6 @@ vcc_acl_entry(struct tokenlist *tl)
ae->t_mask = tl->t;
ExpectErr(tl, CNUM);
ae->mask = vcc_UintVal(tl);
vcc_NextToken(tl);
}
if (ae->para)
......
......@@ -80,7 +80,6 @@ parse_error(struct tokenlist *tl)
}
} 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) {
......
......@@ -304,12 +304,10 @@ vcc_ParseProbe(struct tokenlist *tl)
} 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_ParseProbe(struct tokenlist *tl)
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 @@ vcc_ParseHostDef(struct tokenlist *tl, int serial, const char *vgcname)
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 @@ vcc_ParseHostDef(struct tokenlist *tl, int serial, const char *vgcname)
vsb_printf(tl->sb, " at\n");
vcc_ErrWhere(tl, tl->t);
}
vcc_NextToken(tl);
ERRCHK(tl);
saint = u;
SkipToken(tl, ';');
......
......@@ -69,7 +69,6 @@ vcc_ParseRandomDirector(struct tokenlist *tl)
ExpectErr(tl, CNUM);
retries = vcc_UintVal(tl);
ERRCHK(tl);
vcc_NextToken(tl);
SkipToken(tl, ';');
} else {
ErrInternal(tl);
......@@ -113,7 +112,6 @@ vcc_ParseRandomDirector(struct tokenlist *tl)
return;
}
Fc(tl, 0, "%s .weight = %u", first, u);
vcc_NextToken(tl);
SkipToken(tl, ';');
} else {
ErrInternal(tl);
......
......@@ -137,6 +137,7 @@ vcc_UintVal(struct tokenlist *tl)
d *= 10;
d += *p - '0';
}
vcc_NextToken(tl);
return (d);
}
......
......@@ -133,7 +133,6 @@ vcc_VarVal(struct tokenlist *tl, const struct var *vp, const struct token *vt)
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment