]> git.kaiwu.me - nginx.git/commitdiff
Slight optimization in ngx_http_get_variable_index().
authorRuslan Ermilov <ru@nginx.com>
Thu, 15 Mar 2012 19:41:35 +0000 (19:41 +0000)
committerRuslan Ermilov <ru@nginx.com>
Thu, 15 Mar 2012 19:41:35 +0000 (19:41 +0000)
src/http/ngx_http_variables.c

index 78cfa234a218123a7d9c1cd45b7f4e41317011a5..50325864583cb50ef130885aa6300c8d1243e172 100644 (file)
@@ -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;
 }