Skip to content

Commit

Permalink
Correct -u logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Freaky committed Mar 20, 2022
1 parent c6de4c3 commit 89df67d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checkrestart.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ main(int argc, char *argv[])
case 'u':
uflag = true;
filter_uid = strtonum(optarg, 0, UID_MAX, &err);
if (err == NULL || !user_getuid(optarg, &filter_uid)) {
if (err != NULL && !user_getuid(optarg, &filter_uid)) {
xo_errx(EX_NOUSER, "user \"%s\" not found", optarg);
}
break;
Expand Down

0 comments on commit 89df67d

Please sign in to comment.