summaryrefslogtreecommitdiffstats
path: root/bin/test
diff options
context:
space:
mode:
Diffstat (limited to 'bin/test')
-rw-r--r--bin/test/test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/test/test.c b/bin/test/test.c
index 1637c0d..eed394c 100644
--- a/bin/test/test.c
+++ b/bin/test/test.c
@@ -470,7 +470,8 @@ getn(s)
r = strtol(s, &p, 10);
if (errno != 0)
- error("%s: out of range", s);
+ error((errno == EINVAL) ? "%s: bad number" :
+ "%s: out of range", s);
while (isspace((unsigned char)*p))
p++;
@@ -493,7 +494,8 @@ getq(s)
r = strtoq(s, &p, 10);
if (errno != 0)
- error("%s: out of range", s);
+ error((errno == EINVAL) ? "%s: bad number" :
+ "%s: out of range", s);
while (isspace((unsigned char)*p))
p++;
OpenPOWER on IntegriCloud