Commit a0b34bd4 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Collapse VCT checks

parent eef7871e
...@@ -679,7 +679,7 @@ http_GetContentLength(const struct http *hp) ...@@ -679,7 +679,7 @@ http_GetContentLength(const struct http *hp)
cl = 0; cl = 0;
if (!vct_isdigit(*b)) if (!vct_isdigit(*b))
return (-2); return (-2);
for (;vct_isdigit(*b); b++) { for (; vct_isdigit(*b); b++) {
cll = cl; cll = cl;
cl *= 10; cl *= 10;
cl += *b - '0'; cl += *b - '0';
......
...@@ -66,7 +66,7 @@ vcc_Var_Wildcard(struct vcc *tl, struct symbol *parent, ...@@ -66,7 +66,7 @@ vcc_Var_Wildcard(struct vcc *tl, struct symbol *parent,
AN(vsb); AN(vsb);
VSB_printf(vsb, "&VGC_%s_", vh->rname); VSB_printf(vsb, "&VGC_%s_", vh->rname);
for (p = b, u = 1; p < e; p++, u++) for (p = b, u = 1; p < e; p++, u++)
if (vct_isalpha(*p) || vct_isdigit(*p)) if (vct_isalnum(*p))
VSB_putc(vsb, *p); VSB_putc(vsb, *p);
else else
VSB_printf(vsb, "_%02x_", *p); VSB_printf(vsb, "_%02x_", *p);
......
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