[master] afcdbf646 flexelint 771c02cfa98cfa1e4960f0db91482c1e8d433769

Nils Goroll nils.goroll at uplex.de
Mon Jan 11 18:36:08 UTC 2021


commit afcdbf6467e55aaa5f5b9a617a1804a938a8d8ab
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Jan 11 19:24:10 2021 +0100

    flexelint 771c02cfa98cfa1e4960f0db91482c1e8d433769
    
    it does not understand that wrk_addstat() only returns true for tp !=
    NULL.

diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index 3a83f1642..9b6933cae 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -398,6 +398,7 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk)
 
 		if (wrk_addstat(wrk, tp, 1)) {
 			wrk->stats->summs++;
+			AN(tp);
 		} else if (pp->b_stat != NULL && pp->a_stat->summs) {
 			/* Nothing to do, push pool stats into global pool */
 			tps.func = pool_stat_summ;


More information about the varnish-commit mailing list