comparison src/http/modules/ngx_http_rewrite_module.c @ 1236:5e4d3b5d7ad0

use pointer to an array instead of array for inclusive locations inside location
author Igor Sysoev <igor@sysoev.ru>
date Tue, 05 Jun 2007 11:42:59 +0000
parents 942e241c3b88
children 4c43e25d11ea
comparison
equal deleted inserted replaced
1235:f8a40ccafb04 1236:5e4d3b5d7ad0
565 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; 565 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index];
566 clcf->loc_conf = ctx->loc_conf; 566 clcf->loc_conf = ctx->loc_conf;
567 clcf->name = pclcf->name; 567 clcf->name = pclcf->name;
568 clcf->noname = 1; 568 clcf->noname = 1;
569 569
570 if (pclcf->locations.elts == NULL) { 570 if (pclcf->locations == NULL) {
571 if (ngx_array_init(&pclcf->locations, cf->pool, 4, sizeof(void *)) 571 pclcf->locations = ngx_array_create(cf->pool, 2, sizeof(void *));
572 == NGX_ERROR) 572 if (pclcf->locations == NULL) {
573 {
574 return NGX_CONF_ERROR; 573 return NGX_CONF_ERROR;
575 } 574 }
576 } 575 }
577 576
578 clcfp = ngx_array_push(&pclcf->locations); 577 clcfp = ngx_array_push(pclcf->locations);
579 if (clcfp == NULL) { 578 if (clcfp == NULL) {
580 return NGX_CONF_ERROR; 579 return NGX_CONF_ERROR;
581 } 580 }
582 581
583 *clcfp = clcf; 582 *clcfp = clcf;