diff options
author | Ruslan Ermilov <ru@nginx.com> | 2013-06-19 08:55:08 +0400 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2013-06-19 08:55:08 +0400 |
commit | 02cc52554f7ef326bb92df4ecced524e5d01ee19 (patch) | |
tree | 260733dc16f87144e2f81d2d2ffc59cf50152fc1 /src/core/ngx_list.c | |
parent | c974bd793685a3c820e3099b0417f8876cbaca96 (diff) | |
download | nginx-02cc52554f7ef326bb92df4ecced524e5d01ee19.tar.gz nginx-02cc52554f7ef326bb92df4ecced524e5d01ee19.zip |
Simplified ngx_list_create().
Diffstat (limited to 'src/core/ngx_list.c')
-rw-r--r-- | src/core/ngx_list.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/ngx_list.c b/src/core/ngx_list.c index 89ea82352..d0eb15930 100644 --- a/src/core/ngx_list.c +++ b/src/core/ngx_list.c @@ -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; } |