From 6633572f3118a4c4814699e32ea0671b8b64109c Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 5 Jun 2007 11:42:59 +0000 Subject: use pointer to an array instead of array for inclusive locations inside location --- src/http/modules/ngx_http_rewrite_module.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/http/modules/ngx_http_rewrite_module.c') diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c index a5b96f8fd..41cfc2d97 100644 --- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -567,15 +567,14 @@ ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) clcf->name = pclcf->name; clcf->noname = 1; - if (pclcf->locations.elts == NULL) { - if (ngx_array_init(&pclcf->locations, cf->pool, 4, sizeof(void *)) - == NGX_ERROR) - { + if (pclcf->locations == NULL) { + pclcf->locations = ngx_array_create(cf->pool, 2, sizeof(void *)); + if (pclcf->locations == NULL) { return NGX_CONF_ERROR; } } - clcfp = ngx_array_push(&pclcf->locations); + clcfp = ngx_array_push(pclcf->locations); if (clcfp == NULL) { return NGX_CONF_ERROR; } -- cgit