From 091f6ffce64b0b8f36480c80046a5e961ebfce29 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Thu, 15 Mar 2012 19:41:35 +0000 Subject: [PATCH] Slight optimization in ngx_http_get_variable_index(). --- src/http/ngx_http_variables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index 78cfa234a..503258645 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -384,7 +384,7 @@ ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name) v->flags = 0; v->index = cmcf->variables.nelts - 1; - return cmcf->variables.nelts - 1; + return v->index; }