aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-07-24 16:10:06 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-07-24 16:10:06 +0000
commitbb389f6111ce8058fadbc6754b301f05890c5dbe (patch)
tree11160e0e48a31276b4adec591bc1a31b882293f2 /src
parent64d024605a4bcd9fb57e434a05c5a93692494457 (diff)
downloadnginx-bb389f6111ce8058fadbc6754b301f05890c5dbe.tar.gz
nginx-bb389f6111ce8058fadbc6754b301f05890c5dbe.zip
fuse two if's in one condition
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_file_cache.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index feea1c210..493e67d1f 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -530,7 +530,7 @@ ngx_http_file_cache_exists(ngx_http_file_cache_t *cache, ngx_http_cache_t *c)
goto done;
}
- if (fcn->exists) {
+ if (fcn->exists || fcn->uses >= c->min_uses) {
c->exists = fcn->exists;
c->body_start = fcn->body_start;
@@ -540,16 +540,7 @@ ngx_http_file_cache_exists(ngx_http_file_cache_t *cache, ngx_http_cache_t *c)
goto done;
}
- if (fcn->uses >= c->min_uses) {
-
- c->exists = fcn->exists;
- c->body_start = fcn->body_start;
-
- rc = NGX_OK;
-
- } else {
- rc = NGX_AGAIN;
- }
+ rc = NGX_AGAIN;
goto done;
}