diff src/http/ngx_http_variables.c @ 2536:a6d6d762c554

small optimization: " == NGX_ERROR" > " != NGX_OK"
author Igor Sysoev <igor@sysoev.ru>
date Tue, 24 Feb 2009 10:42:23 +0000
parents c843171d5dc2
children 051e9b12428e
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -332,7 +332,8 @@ ngx_http_get_variable_index(ngx_conf_t *
 
     if (v == NULL) {
         if (ngx_array_init(&cmcf->variables, cf->pool, 4,
-                           sizeof(ngx_http_variable_t)) == NGX_ERROR)
+                           sizeof(ngx_http_variable_t))
+            != NGX_OK)
         {
             return NGX_ERROR;
         }
@@ -1072,9 +1073,7 @@ ngx_http_variable_document_root(ngx_http
             return NGX_ERROR;
         }
 
-        if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0)
-            == NGX_ERROR)
-        {
+        if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) {
             return NGX_ERROR;
         }
 
@@ -1113,9 +1112,7 @@ ngx_http_variable_realpath_root(ngx_http
 
         path.data[path.len - 1] = '\0';
 
-        if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0)
-            == NGX_ERROR)
-        {
+        if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) {
             return NGX_ERROR;
         }
     }