CLEANUP: peers/cli: stop misusing the appctx local variable
In the context of a CLI command, it's particularly not welcome to use
an "appctx" variable that is not the current one. In addition it was
created for use at exactly 6 places in 2 lines. Let's just remove it
and stick to peer->appctx which is used elsewhere in the function and
is unambiguous.
diff --git a/src/peers.c b/src/peers.c
index 6dfa35f..ae829e2 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -3777,7 +3777,6 @@
char pn[INET6_ADDRSTRLEN];
struct stconn *peer_cs;
struct stream *peer_s;
- struct appctx *appctx;
struct shared_table *st;
addr_to_str(&peer->addr, pn, sizeof pn);
@@ -3810,12 +3809,12 @@
chunk_appendf(&trash, " flags=0x%x", peer->flags);
- appctx = peer->appctx;
- if (!appctx)
+ if (!peer->appctx)
goto table_info;
- chunk_appendf(&trash, " appctx:%p st0=%d st1=%d task_calls=%u", appctx, appctx->st0, appctx->st1,
- appctx->t ? appctx->t->calls : 0);
+ chunk_appendf(&trash, " appctx:%p st0=%d st1=%d task_calls=%u",
+ peer->appctx, peer->appctx->st0, peer->appctx->st1,
+ peer->appctx->t ? peer->appctx->t->calls : 0);
peer_cs = appctx_sc(peer->appctx);
peer_s = __sc_strm(peer_cs);