# HG changeset patch # User Ruslan Ermilov # Date 1371617708 -14400 # Node ID a82f305487c22f9c79bff673b2817c1f4d886aa3 # Parent 982678c5c270f93a0c21ab6eb23cb123c0dc3df0 Simplified ngx_list_create(). diff --git a/src/core/ngx_list.c b/src/core/ngx_list.c --- a/src/core/ngx_list.c +++ b/src/core/ngx_list.c @@ -19,18 +19,10 @@ ngx_list_create(ngx_pool_t *pool, ngx_ui 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; }