summaryrefslogtreecommitdiff
path: root/gl/lib/xdectoint.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-12-25 02:21:11 +0000
committerPádraig Brady <P@draigBrady.com>2014-12-25 02:30:05 +0000
commit3b7c9d1a31a183b903de9c1396a17b4ee64f09f8 (patch)
treef4b4532d1cae9d08fdfd5d52bd38c60981e59c77 /gl/lib/xdectoint.c
parent6894816c653adef54f3a85becbf75a865d6d39d6 (diff)
downloadcoreutils-3b7c9d1a31a183b903de9c1396a17b4ee64f09f8.tar.xz
tests: fix error message check on some systems
http://hydra.nixos.org/build/18129583 identified (on OS X) an incorrect test assumption in the previous commit. * gl/lib/xdectoint.c (__xnumtoint): Suppress the EINVAL error message as it's redundant in this context. * tests/misc/tail.pl: Suppress _optionally_ appended strerror messages. * tests/fmt/base.pl: Likewise. * tests/pr/pr-tests.pl: Likewise. * tests/split/l-chunk.sh: Likewise.
Diffstat (limited to 'gl/lib/xdectoint.c')
-rw-r--r--gl/lib/xdectoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gl/lib/xdectoint.c b/gl/lib/xdectoint.c
index 2164d1ef4..9ca128130 100644
--- a/gl/lib/xdectoint.c
+++ b/gl/lib/xdectoint.c
@@ -65,7 +65,8 @@ __xnumtoint (const char *n_str, int base, __xdectoint_t min, __xdectoint_t max,
if (s_err != LONGINT_OK)
{
- error (err_exit ? err_exit : EXIT_FAILURE, errno,
+ /* EINVAL error message is redundant in this context. */
+ error (err_exit ? err_exit : EXIT_FAILURE, errno == EINVAL ? 0 : errno,
"%s: %s", err, quote (n_str));
}