Skip to content

Commit

Permalink
src/check_subid_range.c: Remove dead code
Browse files Browse the repository at this point in the history
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: f3a1e1c ("src/check_subid_range.c: Call str2ul() instead of strtoul_noneg()")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
  • Loading branch information
alejandro-colomar authored and ikerexxe committed Oct 3, 2024
1 parent af66ffe commit 7a79689
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/check_subid_range.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7a79689

Please sign in to comment.