Mercurial > hg > nginx
changeset 5253:a82f305487c2
Simplified ngx_list_create().
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 19 Jun 2013 08:55:08 +0400 |
parents | 982678c5c270 |
children | 7ecaa9e4bf1b |
files | src/core/ngx_list.c |
diffstat | 1 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_list.c Wed Jun 12 00:41:24 2013 +0900 +++ b/src/core/ngx_list.c Wed Jun 19 08:55:08 2013 +0400 @@ -19,18 +19,10 @@ 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; }