From: Willy Tarreau Date: Wed, 13 Sep 2023 11:31:41 +0000 (+0200) Subject: CLEANUP: pools: simplify the pool expression when no pool was matched in dump X-Git-Tag: v2.9-dev6~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5abbae2d3d292039a3ad4b45128a69d538c7e88d;p=thirdparty%2Fhaproxy.git CLEANUP: pools: simplify the pool expression when no pool was matched in dump When dumping pool information, we make a special case of the condition where the pool couldn't be identified and we consider that it was the correct one. In the code arrangements brought by commit efc46dede ("DEBUG: pools: inspect pools on fatal error and dump information found"), a ternary expression for testing this depends on the "if" block condition so this can be simplified and will make Coverity happy. This was reported in GH #2290. --- diff --git a/src/pool.c b/src/pool.c index 058c445405..2f20fd5553 100644 --- a/src/pool.c +++ b/src/pool.c @@ -1055,7 +1055,7 @@ void pool_inspect_item(const char *msg, struct pool_head *pool, const void *item /* the pool couldn't be formally verified */ chunk_appendf(&trash, "Other possible callers:\n"); list_for_each_entry(ph, &pools, list) { - if (ph == (the_pool ? the_pool : pool)) + if (ph == pool) continue; pool_mark = (const void **)(((char *)item) + ph->alloc_sz - sizeof(void*)); if (!may_access(pool_mark))