comparison src/http/ngx_http_variables.c @ 4540:cab9aa79256c

Slight optimization in ngx_http_get_variable_index().
author Ruslan Ermilov <ru@nginx.com>
date Thu, 15 Mar 2012 19:41:35 +0000
parents d9bf6caf0371
children ba39af7274ed
comparison
equal deleted inserted replaced
4539:674227175c4c 4540:cab9aa79256c
382 v->get_handler = NULL; 382 v->get_handler = NULL;
383 v->data = 0; 383 v->data = 0;
384 v->flags = 0; 384 v->flags = 0;
385 v->index = cmcf->variables.nelts - 1; 385 v->index = cmcf->variables.nelts - 1;
386 386
387 return cmcf->variables.nelts - 1; 387 return v->index;
388 } 388 }
389 389
390 390
391 ngx_http_variable_value_t * 391 ngx_http_variable_value_t *
392 ngx_http_get_indexed_variable(ngx_http_request_t *r, ngx_uint_t index) 392 ngx_http_get_indexed_variable(ngx_http_request_t *r, ngx_uint_t index)