Skip to content

Commit

Permalink
Fix for "warning: ISO C90 forbids mixing declarations and code" (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrossard committed Oct 4, 2016
1 parent ee9ba1d commit 581ba8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/threadpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ int threadpool_free(threadpool_t *pool);

threadpool_t *threadpool_create(int thread_count, int queue_size, int flags)
{
if(thread_count <= 0 || thread_count > MAX_THREADS || queue_size <= 0 || queue_size > MAX_QUEUE) {
return NULL;
}

threadpool_t *pool;
int i;
(void) flags;

if(thread_count <= 0 || thread_count > MAX_THREADS || queue_size <= 0 || queue_size > MAX_QUEUE) {
return NULL;
}

if((pool = (threadpool_t *)malloc(sizeof(threadpool_t))) == NULL) {
goto err;
}
Expand Down

0 comments on commit 581ba8b

Please sign in to comment.