comparison src/http/ngx_http_file_cache.c @ 3966:9c425f22ea36

fuse two if's in one condition
author Igor Sysoev <igor@sysoev.ru>
date Sun, 24 Jul 2011 16:10:06 +0000
parents 90b0487fba44
children 83e41f6f6d96
comparison
equal deleted inserted replaced
3965:90b0487fba44 3966:9c425f22ea36
528 rc = NGX_OK; 528 rc = NGX_OK;
529 529
530 goto done; 530 goto done;
531 } 531 }
532 532
533 if (fcn->exists) { 533 if (fcn->exists || fcn->uses >= c->min_uses) {
534 534
535 c->exists = fcn->exists; 535 c->exists = fcn->exists;
536 c->body_start = fcn->body_start; 536 c->body_start = fcn->body_start;
537 537
538 rc = NGX_OK; 538 rc = NGX_OK;
539 539
540 goto done; 540 goto done;
541 } 541 }
542 542
543 if (fcn->uses >= c->min_uses) { 543 rc = NGX_AGAIN;
544
545 c->exists = fcn->exists;
546 c->body_start = fcn->body_start;
547
548 rc = NGX_OK;
549
550 } else {
551 rc = NGX_AGAIN;
552 }
553 544
554 goto done; 545 goto done;
555 } 546 }
556 547
557 fcn = ngx_slab_alloc_locked(cache->shpool, 548 fcn = ngx_slab_alloc_locked(cache->shpool,