Fix warning at line 285.
It may can’t catch the malloc error.
This commit is contained in:
parent
430251cb65
commit
71f5bc9613
2
thpool.c
2
thpool.c
|
@ -282,7 +282,7 @@ int thpool_num_threads_working(thpool_* thpool_p){
|
|||
static int thread_init (thpool_* thpool_p, struct thread** thread_p, int id){
|
||||
|
||||
*thread_p = (struct thread*)malloc(sizeof(struct thread));
|
||||
if (thread_p == NULL){
|
||||
if (*thread_p == NULL){
|
||||
err("thread_init(): Could not allocate memory for thread\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue