CLEANUP: cli: simplify the "show cli sockets" I/O handler
authorWilly Tarreau <w@1wt.eu>
Thu, 5 May 2022 16:52:36 +0000 (18:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 May 2022 16:13:36 +0000 (18:13 +0200)
commit4df54eb15177f2b661d9c39e45f36c05e93830f8
tree7c7edf99dec865ca31e03d2c4a6f62d757e211ee
parent307dbb33bbf4df3c590673ca0ddc4186d0b3d924
CLEANUP: cli: simplify the "show cli sockets" I/O handler

The code is was a bit convoluted by the use of a state machine around
st2 that is not used since only the STAT_ST_LIST state was used, and
the test of global.cli_fe inside the loop while it ought better be
tested before entering there. Let's get rid of this unneded state and
simplify the code. There's no more need for ->st2 now. The code looks
more changed than it really is due to the reindent caused by the
removal of the switch statement, but "git show -b" shows what really
changed.
src/cli.c