src/faillog.c: Simplify, by calling str2sh() 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 21:39:43 +01:00
parent 0464c1abf1
commit ab9f4da83f

View File

@@ -557,16 +557,12 @@ int main (int argc, char **argv)
break;
case 'm':
{
long lmax;
if ( (str2sl(&lmax, optarg) == -1)
|| ((long)(short) lmax != lmax)) {
if (str2sh(&fail_max, optarg) == -1) {
fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);
exit (E_BAD_ARG);
}
fail_max = lmax;
mflg = true;
break;
}