pthreadpool: ignore the return value of poll(NULL, 0UL, 1)
authorStefan Metzmacher <metze@samba.org>
Tue, 31 Jul 2018 07:40:20 +0000 (09:40 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 31 Jul 2018 09:26:16 +0000 (11:26 +0200)
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 <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
lib/pthreadpool/pthreadpool_tevent.c

index b4a9786f231a2104e1befe77be0bf2e495b9d939..7088202d97cae8751de73b39a119622207aa6e0e 100644 (file)
@@ -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;
@@ -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);
        }