diff options
Diffstat (limited to 'src/os/unix/ngx_pthread_thread.c')
-rw-r--r-- | src/os/unix/ngx_pthread_thread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/os/unix/ngx_pthread_thread.c b/src/os/unix/ngx_pthread_thread.c index 4903d5e50..0b55c7192 100644 --- a/src/os/unix/ngx_pthread_thread.c +++ b/src/os/unix/ngx_pthread_thread.c @@ -75,7 +75,8 @@ ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags) int err; ngx_mutex_t *m; - if (!(m = ngx_alloc(sizeof(ngx_mutex_t), log))) { + m = ngx_alloc(sizeof(ngx_mutex_t), log); + if (m == NULL) { return NULL; } @@ -189,7 +190,8 @@ ngx_cond_t *ngx_cond_init(ngx_log_t *log) int err; ngx_cond_t *cv; - if (!(cv = ngx_alloc(sizeof(ngx_cond_t), log))) { + cv = ngx_alloc(sizeof(ngx_cond_t), log); + if (cv == NULL) { return NULL; } |