From 5f2055c395a5c80e77395fe39c57e125296dffcc Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 9 Jan 2024 20:01:09 +0100 Subject: [PATCH] lib/getdef.c: getdef_long(): Simplify, by calling a2sl() instead of str2sl() Reviewed-by: "Serge E. Hallyn" Signed-off-by: Alejandro Colomar --- lib/getdef.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/getdef.c b/lib/getdef.c index 5475b40e..cc635ae7 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);