]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: server: simplify server_find_by_id()
authorWilly Tarreau <w@1wt.eu>
Wed, 9 Jul 2025 14:35:27 +0000 (16:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 15 Jul 2025 08:30:28 +0000 (10:30 +0200)
commitfda04994d90cc9b731346f73037328881e9bd638
treee9b43860bb4bf8f0f2deb586069c5bbc7fb083fc
parentc8f0b69587649c0f1a6fcb36dc5e0345225deede
CLEANUP: server: simplify server_find_by_id()

At a few places we're seeing some open-coding of the same function, likely
because it looks overkill for what it's supposed to do, due to extraneous
tests that are not needed (e.g. check of the backend's PR_CAP_BE etc).
Let's just remove all these superfluous tests and inline it so that it
feels more suitable for use everywhere it's needed.
include/haproxy/server.h
src/server.c