mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Simplified ngx_list_create().
This commit is contained in:
parent
c974bd7936
commit
02cc52554f
@ -19,18 +19,10 @@ ngx_list_create(ngx_pool_t *pool, ngx_uint_t n, size_t size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
list->part.elts = ngx_palloc(pool, n * size);
|
||||
if (list->part.elts == NULL) {
|
||||
if (ngx_list_init(list, pool, n, size) != NGX_OK) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
list->part.nelts = 0;
|
||||
list->part.next = NULL;
|
||||
list->last = &list->part;
|
||||
list->size = size;
|
||||
list->nalloc = n;
|
||||
list->pool = pool;
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user