From: Alejandro Colomar Date: Tue, 9 Jan 2024 19:01:09 +0000 (+0100) Subject: lib/getdef.c: getdef_long(): Simplify, by calling a2sl() instead of str2sl() X-Git-Tag: 4.17.0-rc1~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f2055c395a5c80e77395fe39c57e125296dffcc;p=thirdparty%2Fshadow.git lib/getdef.c: getdef_long(): Simplify, by calling a2sl() instead of str2sl() Reviewed-by: "Serge E. Hallyn" Signed-off-by: Alejandro Colomar --- diff --git a/lib/getdef.c b/lib/getdef.c index 5475b40e0..cc635ae73 100644 --- a/lib/getdef.c +++ b/lib/getdef.c @@ -316,7 +316,7 @@ long getdef_long (const char *item, long dflt) return dflt; } - if (str2sl(&val, d->value) == -1 || val < -1) { + if (a2sl(&val, d->value, NULL, 0, -1, LONG_MAX) == -1) { fprintf (shadow_logfd, _("configuration error - cannot parse %s value: '%s'"), item, d->value);