Skip to content

Commit

Permalink
Refactor: libcrmservice: make static analysis happy
Browse files Browse the repository at this point in the history
  • Loading branch information
kgaillot committed Oct 31, 2019
1 parent 739fb14 commit 9618253
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/services/services_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,12 @@ action_synced_wait(svc_action_t * op, sigset_t *mask)
int wait_rc = 0;

#ifdef HAVE_SYS_SIGNALFD_H
sfd = signalfd(-1, mask, SFD_NONBLOCK);
if (sfd < 0) {
crm_perror(LOG_ERR, "signalfd() failed");
// mask is always non-NULL in practice, but this makes static analysis happy
if (mask) {
sfd = signalfd(-1, mask, SFD_NONBLOCK);
if (sfd < 0) {
crm_perror(LOG_ERR, "signalfd() failed");
}
}
#else
sfd = sigchld_pipe[0];
Expand Down

0 comments on commit 9618253

Please sign in to comment.