diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cidr.c | 11 | ||||
-rw-r--r-- | src/wordsplit.c | 2 |
2 files changed, 7 insertions, 6 deletions
@@ -121,43 +121,44 @@ grecs_str_to_cidr(struct grecs_cidr *pcidr, const char *str, if (p) len = p - str; else len = strlen(str); if (len > sizeof(ipbuf)) { - grecs_error(locus, 0, _("network length too big: %s"), str); + grecs_error(locus, 0, _("invalid network mask: %s"), + str); return -1; } memcpy(ipbuf, str, len); ipbuf[len] = 0; if (grecs_str_is_ipv4(ipbuf)) cidr.family = AF_INET; else if (grecs_str_is_ipv6(ipbuf)) cidr.family = AF_INET6; else { - grecs_error(locus, 0, _("unrecognized network family: %s"), + grecs_error(locus, 0, _("unrecognized address family: %s"), str); return -1; } rc = inet_pton(cidr.family, ipbuf, &inaddr); if (rc == -1) { - grecs_error(locus, 0, _("unrecognized network family: %s"), + grecs_error(locus, 0, _("unrecognized address family: %s"), str); return -1; } else if (rc != 1) { - grecs_error(locus, 0, _("invalid network: %s"), + grecs_error(locus, 0, _("invalid network address: %s"), str); return -1; } cidr.len = grecs_inaddr_to_bytes(cidr.family, &inaddr, cidr.address); if (cidr.len == 0) { - grecs_error(locus, 0, _("unrecognized network family: %s"), + grecs_error(locus, 0, _("unrecognized address family: %s"), str); return -1; } if (p) { char *end; diff --git a/src/wordsplit.c b/src/wordsplit.c index 1045ca8..c9bd9cb 100644 --- a/src/wordsplit.c +++ b/src/wordsplit.c @@ -1080,13 +1080,13 @@ expvar (struct wordsplit *wsp, const char *str, size_t len, (wsp->ws_flags & (WRDSF_NOVAR | WRDSF_NOCMD))); if (rc == 0) wsp->ws_error ("%.*s: %s", (int) i, str, ws.ws_wordv[0]); else - wsp->ws_error (_("%.*s: %.*s"), + wsp->ws_error ("%.*s: %.*s", (int) i, str, (int) size, defstr); wordsplit_free (&ws); } } value = NULL; } |