Just break out of the loop instead, it does the same thing.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
while (!pool->workqueue && !pool->shutdown)
pthread_cond_wait(&pool->new_work, &pool->m);
- if (pool->shutdown) {
- pthread_mutex_unlock(&pool->m);
- return NULL;
- }
+ if (pool->shutdown)
+ break;
/* Pull the first task from the list. We don't free it -- it now lacks
* a reference other than the worker creator's, whose responsibility it