Skip to content

Commit

Permalink
Adjust the check of the return value of pidfd_open in auditctl
Browse files Browse the repository at this point in the history
  • Loading branch information
stevegrubb committed Mar 11, 2024
1 parent 4151d46 commit 67a171b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/auditctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ static int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
static int sure_kill(int pid, int signal)
{
int rc = 0;
int pidfd;
if ((pidfd = pidfd_open(pid, 0) < 0))
int pidfd = pidfd_open(pid, 0);
if (pidfd < 0)
return -1;
if (pidfd_send_signal(pidfd, signal, NULL, 0) < 0) {
rc = -1;
Expand Down

0 comments on commit 67a171b

Please sign in to comment.