]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
last: Use strtou32_or_err for -n arguments
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 4 Apr 2026 16:07:09 +0000 (18:07 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 4 Apr 2026 16:14:59 +0000 (18:14 +0200)
The maximum amount of records is an unsigned int. Use the correct parser
function.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
login-utils/last.c

index 19f5fd9610197c2b95a3b870e5221a5f3a0d9f02..12af0129895d0e8f990311bfa2df4b7772cf46f9 100644 (file)
@@ -1060,7 +1060,7 @@ int main(int argc, char **argv)
                        ctl.extended = 1;
                        break;
                case 'n':
-                       ctl.maxrecs = strtos32_or_err(optarg, _("failed to parse number"));
+                       ctl.maxrecs = strtou32_or_err(optarg, _("failed to parse number"));
                        break;
                case 'f':
                        if (!files)