[master] ae3003479 wrk: Simplify condition

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jul 3 14:04:06 UTC 2023


commit ae3003479d7d3d7ee8dda85f549b2aafefff4375
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed Jun 28 11:08:19 2023 +0200

    wrk: Simplify condition

diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index fe4c650b5..427ddafbf 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -193,7 +193,7 @@ wrk_addstat(const struct worker *wrk, const struct pool_task *tp, unsigned locke
 			Lck_Unlock(&pp->mtx);
 	}
 
-	return (tp == NULL ? 0 : 1);
+	return (tp != NULL);
 }
 
 void


More information about the varnish-commit mailing list