summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/xstrtol.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/xstrtol.c b/lib/xstrtol.c
index fea6c4801..ad2bcdbf1 100644
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -91,15 +91,14 @@ __xstrtol (s, ptr, base, val, valid_suffixes)
return LONGINT_OVERFLOW;
if (*p == s)
return LONGINT_INVALID;
+
+ /* Let valid_suffixes == NULL mean `allow any suffix'. */
+ /* FIXME: update all callers except the one in tail.c changing
+ last parameter NULL to `""'. */
if (!valid_suffixes)
{
- if (**p == '\0')
- {
- *val = tmp;
- return LONGINT_OK;
- }
- else
- return LONGINT_INVALID_SUFFIX_CHAR;
+ *val = tmp;
+ return LONGINT_OK;
}
if (**p != '\0')