]> git.kaiwu.me - nginx.git/commitdiff
fuse two if's in one condition
authorIgor Sysoev <igor@sysoev.ru>
Sun, 24 Jul 2011 16:10:06 +0000 (16:10 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 24 Jul 2011 16:10:06 +0000 (16:10 +0000)
src/http/ngx_http_file_cache.c

index feea1c21056c72291ed20e11595de8ecb2fc751a..493e67d1f41372baf388b8a9ce976ebf20090343 100644 (file)
@@ -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;
     }