Skip to content

Commit 67a171b

Browse files
committed
Adjust the check of the return value of pidfd_open in auditctl
1 parent 4151d46 commit 67a171b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/auditctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ static int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
425425
static int sure_kill(int pid, int signal)
426426
{
427427
int rc = 0;
428-
int pidfd;
429-
if ((pidfd = pidfd_open(pid, 0) < 0))
428+
int pidfd = pidfd_open(pid, 0);
429+
if (pidfd < 0)
430430
return -1;
431431
if (pidfd_send_signal(pidfd, signal, NULL, 0) < 0) {
432432
rc = -1;

0 commit comments

Comments
 (0)