]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/faillog.c: Simplify, by calling str2sh() instead of str2sl()
authorAlejandro Colomar <alx@kernel.org>
Tue, 9 Jan 2024 20:39:43 +0000 (21:39 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 2 Jul 2024 20:52:31 +0000 (22:52 +0200)
Reviewed-by: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/faillog.c

index 75910bb6070d690c5205ce79191c92a38dbfff48..23a9c6c532cdf9520b22c54d2546e7f83fdff344 100644 (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;
                        }