lib/getdef.c: getdef_long(): Simplify, by calling a2sl() instead of str2sl()

Reviewed-by: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2024-01-09 20:01:09 +01:00
parent 45d4472c92
commit 5f2055c395
+1 -1
View File
@@ -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);