[6.0] 2dc0afd17 make two identical comparisons the same

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Feb 12 10:03:09 UTC 2019


commit 2dc0afd17f1e123513c83abbe36d9c9f63df083a
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Dec 5 11:40:13 2018 +0100

    make two identical comparisons the same
    
    see 11 lines down
    
    Conflicts:
            bin/varnishd/cache/cache_hash.c

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 6d030c9ad..78b61ce11 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -501,9 +501,8 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp)
 		if (exp_oc != NULL) {
 			exp_oc->refcnt++;
 			*ocp = exp_oc;
-			if (EXP_Ttl_grace(req, exp_oc) > req->t_req) {
-				if (exp_oc->hits < LONG_MAX)
-					exp_oc->hits++;
+			if (EXP_Ttl_grace(req, exp_oc) >= req->t_req) {
+				exp_oc->hits++;
 				Lck_Unlock(&oh->mtx);
 				return (HSH_GRACE);
 			}


More information about the varnish-commit mailing list