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-03-21 19:52:52 +0400
committerRuslan Ermilov <ru@nginx.com>2013-03-21 19:52:52 +0400
commit7b80e43389c313b15574df255dbf5336d6b1dc20 (patch)
tree801db3f3882450b3536ec5e29854c2a939e6aa6f /src/core/ngx_array.c
parent9e5f617d6631088adc77800da51815bbc2387651 (diff)
Simplified ngx_array_create().
Diffstat (limited to 'src/core/ngx_array.c')
-rw-r--r--src/core/ngx_array.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/ngx_array.c b/src/core/ngx_array.c
index 4627a9912..4ea226f06 100644
--- a/src/core/ngx_array.c
+++ b/src/core/ngx_array.c
@@ -19,16 +19,10 @@ ngx_array_create(ngx_pool_t *p, ngx_uint_t n, size_t size)
return NULL;
}
- a->elts = ngx_palloc(p, n * size);
- if (a->elts == NULL) {
+ if (ngx_array_init(a, p, n, size) != NGX_OK) {
return NULL;
}
- a->nelts = 0;
- a->size = size;
- a->nalloc = n;
- a->pool = p;
-
return a;
}