From 5abbae2d3d292039a3ad4b45128a69d538c7e88d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 13 Sep 2023 13:31:41 +0200 Subject: [PATCH] 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. --- src/pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pool.c b/src/pool.c index 058c44540..2f20fd555 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))