diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-02-24 10:42:23 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-02-24 10:42:23 +0000 |
commit | 1f4220ee869152938d9140c471c37be628532344 (patch) | |
tree | bb17b08acf1f50770fec0846cd6202a593b93674 /src/http/ngx_http_variables.c | |
parent | 9b4a1d00941db4b85fc2ffe7424b706b56f7133f (diff) | |
download | nginx-1f4220ee869152938d9140c471c37be628532344.tar.gz nginx-1f4220ee869152938d9140c471c37be628532344.zip |
small optimization: " == NGX_ERROR" > " != NGX_OK"
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r-- | src/http/ngx_http_variables.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index 75ec740ca..360f8376f 100644 --- 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 *cf, ngx_str_t *name) 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_request_t *r, 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_request_t *r, 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; } } |