Simplified ngx_array_create().

This commit is contained in:
Ruslan Ermilov 2013-03-21 15:52:52 +00:00
parent 9e5f617d66
commit 7b80e43389

View File

@ -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;
}