Commit eb0e6a4d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Improve a couple of error messages.

parent d532867f
......@@ -100,7 +100,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
if (fam == PF_INET && ae->mask > 32) {
VSB_printf(tl->sb,
"Too wide mask (%u) for IPv4 address", ae->mask);
"Too wide mask (%u) for IPv4 address\n", ae->mask);
if (ae->t_mask != NULL)
vcc_ErrWhere(tl, ae->t_mask);
else
......@@ -109,7 +109,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
}
if (fam == PF_INET6 && ae->mask > 128) {
VSB_printf(tl->sb,
"Too wide mask (%u) for IPv6 address", ae->mask);
"Too wide mask (%u) for IPv6 address\n", ae->mask);
vcc_ErrWhere(tl, ae->t_mask);
return;
}
......
......@@ -38,7 +38,7 @@
void
vcc_ParseRandomDirector(struct vcc *tl)
{
struct token *t_field, *t_be;
struct token *t_field, *t_be, *t_x;
int nelem;
struct fld_spec *fs, *mfs;
unsigned u, retries;
......@@ -86,15 +86,14 @@ vcc_ParseRandomDirector(struct vcc *tl)
first, p);
} else if (vcc_IdIs(t_field, "weight")) {
ExpectErr(tl, CNUM);
t_x = tl->t;
u = vcc_UintVal(tl);
ERRCHK(tl);
if (u == 0) {
VSB_printf(tl->sb,
"The .weight must be higher "
"than zero.");
vcc_ErrToken(tl, tl->t);
VSB_printf(tl->sb, " at\n");
vcc_ErrWhere(tl, tl->t);
"than zero.\n");
vcc_ErrWhere(tl, t_x);
return;
}
Fc(tl, 0, "%s .weight = %u", first, u);
......
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