Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2013-06-19 08:55:08 +0400
committerRuslan Ermilov <ru@nginx.com>2013-06-19 08:55:08 +0400
commit02cc52554f7ef326bb92df4ecced524e5d01ee19 (patch)
tree260733dc16f87144e2f81d2d2ffc59cf50152fc1 /src/core/ngx_list.c
parentc974bd793685a3c820e3099b0417f8876cbaca96 (diff)
Simplified ngx_list_create().
Diffstat (limited to 'src/core/ngx_list.c')
-rw-r--r--src/core/ngx_list.c10
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;
}