summaryrefslogtreecommitdiff
path: root/gl/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gl/lib')
-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));
}