summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-23 09:16:22 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2016-02-23 09:16:22 (GMT)
commit8241dc04501f62b613f17f5c165f915a216ba30c (patch) (unidiff)
treee4a453fc6f74103c01c165d170c4662e881786c6 /src
parent07838fb2e9ed5769074add028e052a3b667e67e7 (diff)
downloadgrecs-8241dc04501f62b613f17f5c165f915a216ba30c.tar.gz
grecs-8241dc04501f62b613f17f5c165f915a216ba30c.tar.bz2
Reword some diagnostics
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/cidr.c11
-rw-r--r--src/wordsplit.c2
2 files changed, 7 insertions, 6 deletions
diff --git a/src/cidr.c b/src/cidr.c
index 6de7f36..f710e83 100644
--- a/src/cidr.c
+++ b/src/cidr.c
@@ -124,7 +124,8 @@ grecs_str_to_cidr(struct grecs_cidr *pcidr, const char *str,
124 len = strlen(str); 124 len = strlen(str);
125 125
126 if (len > sizeof(ipbuf)) { 126 if (len > sizeof(ipbuf)) {
127 grecs_error(locus, 0, _("network length too big: %s"), str); 127 grecs_error(locus, 0, _("invalid network mask: %s"),
128 str);
128 return -1; 129 return -1;
129 } 130 }
130 131
@@ -136,25 +137,25 @@ grecs_str_to_cidr(struct grecs_cidr *pcidr, const char *str,
136 else if (grecs_str_is_ipv6(ipbuf)) 137 else if (grecs_str_is_ipv6(ipbuf))
137 cidr.family = AF_INET6; 138 cidr.family = AF_INET6;
138 else { 139 else {
139 grecs_error(locus, 0, _("unrecognized network family: %s"), 140 grecs_error(locus, 0, _("unrecognized address family: %s"),
140 str); 141 str);
141 return -1; 142 return -1;
142 } 143 }
143 144
144 rc = inet_pton(cidr.family, ipbuf, &inaddr); 145 rc = inet_pton(cidr.family, ipbuf, &inaddr);
145 if (rc == -1) { 146 if (rc == -1) {
146 grecs_error(locus, 0, _("unrecognized network family: %s"), 147 grecs_error(locus, 0, _("unrecognized address family: %s"),
147 str); 148 str);
148 return -1; 149 return -1;
149 } else if (rc != 1) { 150 } else if (rc != 1) {
150 grecs_error(locus, 0, _("invalid network: %s"), 151 grecs_error(locus, 0, _("invalid network address: %s"),
151 str); 152 str);
152 return -1; 153 return -1;
153 } 154 }
154 155
155 cidr.len = grecs_inaddr_to_bytes(cidr.family, &inaddr, cidr.address); 156 cidr.len = grecs_inaddr_to_bytes(cidr.family, &inaddr, cidr.address);
156 if (cidr.len == 0) { 157 if (cidr.len == 0) {
157 grecs_error(locus, 0, _("unrecognized network family: %s"), 158 grecs_error(locus, 0, _("unrecognized address family: %s"),
158 str); 159 str);
159 return -1; 160 return -1;
160 } 161 }
diff --git a/src/wordsplit.c b/src/wordsplit.c
index 1045ca8..c9bd9cb 100644
--- a/src/wordsplit.c
+++ b/src/wordsplit.c
@@ -1083,7 +1083,7 @@ expvar (struct wordsplit *wsp, const char *str, size_t len,
1083 wsp->ws_error ("%.*s: %s", 1083 wsp->ws_error ("%.*s: %s",
1084 (int) i, str, ws.ws_wordv[0]); 1084 (int) i, str, ws.ws_wordv[0]);
1085 else 1085 else
1086 wsp->ws_error (_("%.*s: %.*s"), 1086 wsp->ws_error ("%.*s: %.*s",
1087 (int) i, str, (int) size, defstr); 1087 (int) i, str, (int) size, defstr);
1088 wordsplit_free (&ws); 1088 wordsplit_free (&ws);
1089 } 1089 }

Return to:

Send suggestions and report system problems to the System administrator.