Skip to content

Commit

Permalink
pthreadpool: ignore the return value of poll(NULL, 0UL, 1)
Browse files Browse the repository at this point in the history
Otherwise Coverity reports this:

CID 1438160:    (CHECKED_RETURN)
Calling "poll(NULL, 0UL, 1)" without checking return value. This
library function may fail and return an error code.

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
  • Loading branch information
metze-samba authored and vlendec committed Jul 31, 2018
1 parent 80c9219 commit 6da0d68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pthreadpool/pthreadpool_tevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ static void pthreadpool_tevent_job_orphan(struct pthreadpool_tevent_job *job)
*/
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
while (job->needs_fence.wrapper) {
poll(NULL, 0, 1);
(void)poll(NULL, 0, 1);
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
}
job->wrapper = NULL;
Expand Down Expand Up @@ -903,7 +903,7 @@ static void pthreadpool_tevent_job_orphan(struct pthreadpool_tevent_job *job)
if (job->needs_fence.signaled) {
break;
}
poll(NULL, 0, 1);
(void)poll(NULL, 0, 1);
PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
}

Expand Down

0 comments on commit 6da0d68

Please sign in to comment.