Mercurial > hg > nginx
diff src/core/ngx_list.c @ 5253:a82f305487c2
Simplified ngx_list_create().
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 19 Jun 2013 08:55:08 +0400 |
parents | d620f497c50f |
children |
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; }