diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-06-05 11:42:59 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-06-05 11:42:59 +0000 |
commit | 6633572f3118a4c4814699e32ea0671b8b64109c (patch) | |
tree | 20990ab3ba5c3007f0ff0c8bebb22ea93669300a /src/http/modules/ngx_http_rewrite_module.c | |
parent | c915106f20629a3306fae10db413d5d596c1fc3e (diff) | |
download | nginx-6633572f3118a4c4814699e32ea0671b8b64109c.tar.gz nginx-6633572f3118a4c4814699e32ea0671b8b64109c.zip |
use pointer to an array instead of array for inclusive locations inside location
Diffstat (limited to 'src/http/modules/ngx_http_rewrite_module.c')
-rw-r--r-- | src/http/modules/ngx_http_rewrite_module.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |