Slight optimization in ngx_http_get_variable_index().
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 78cfa23..5032586 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -384,7 +384,7 @@
     v->flags = 0;
     v->index = cmcf->variables.nelts - 1;
 
-    return cmcf->variables.nelts - 1;
+    return v->index;
 }