]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/check_subid_range.c: Remove dead code
authorAlejandro Colomar <alx@kernel.org>
Wed, 2 Oct 2024 22:19:02 +0000 (00:19 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Thu, 3 Oct 2024 08:38:56 +0000 (10:38 +0200)
I forgot to remove the setting of errno when I switched from
strtoul_noneg() to str2ul().  strtoul(3) needs errno for determining
success, but str2ul() does not.

Fixes: f3a1e1cf098d ("src/check_subid_range.c: Call str2ul() instead of strtoul_noneg()")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/check_subid_range.c

index 5f5b75918e6f1459d961f53a37edfd644fdc881a..482267581fee442e8e0848f164f3d56c2b87821d 100644 (file)
@@ -6,7 +6,6 @@
 #include <config.h>
 #include <stdio.h>
 #include <string.h>
-#include <errno.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -41,7 +40,6 @@ main(int argc, char **argv)
 
        owner = argv[1];
        check_uids = argv[2][0] == 'u';
-       errno = 0;
        if (get_uid(argv[3], &start) == -1)
                exit(1);
        if (str2ul(&count, argv[4]) == -1)