changeset 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 674227175c4c
children 2e7ac96049b8
files src/http/ngx_http_variables.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 *
     v->flags = 0;
     v->index = cmcf->variables.nelts - 1;
 
-    return cmcf->variables.nelts - 1;
+    return v->index;
 }