CLEANUP: peers: remove an unneeded null check

Coverity reported in GH #3181 that a NULL test was useless, in
peers_trace(), which is true since the peer always belongs to a
peers section and it was already dereferenced. Let's just remove
the test to avoid the confusion.
This commit is contained in:
Willy Tarreau 2025-11-14 13:46:00 +01:00
parent ef206d441c
commit 6b9c3d0621

View File

@ -449,9 +449,8 @@ static void peers_trace(enum trace_level level, uint64_t mask,
chunk_appendf(&trace_buf, "appctx=(%p, .fl=0x%08x, .st0=%d, .st1=%d) ",
appctx, appctx->flags, appctx->st0, appctx->st1);
if (peers)
chunk_appendf(&trace_buf, "peers=(.fl=0x%08x, local=%s) ",
peers->flags, peers->local->id);
chunk_appendf(&trace_buf, "peers=(.fl=0x%08x, local=%s) ",
peers->flags, peers->local->id);
if (src->verbosity == PEERS_VERB_SIMPLE)
return;