From: Erwan Velu Date: Tue, 30 Aug 2016 09:48:44 +0000 (+0200) Subject: CLEANUP: dumpstats: Removing useless variables allocation X-Git-Tag: v1.7-dev5~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f714fb533e2c9d0014a3bb035d92676cb48a3ddd;p=thirdparty%2Fhaproxy.git CLEANUP: dumpstats: Removing useless variables allocation In dump_servers_state(), srv_time_since_last_change, bk_f_forced_id, srv_f_forced_id variables were firstly set to zero and immediately reassigned to another value while never been accessed in between. Sounds like a useless initiazation. So let's make only the useful allocation. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index c88d0acbd0..6c8e3ee57b 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -3112,9 +3112,6 @@ static int dump_servers_state(struct stream_interface *si, struct chunk *buf) for (; appctx->ctx.server_state.sv != NULL; appctx->ctx.server_state.sv = srv->next) { srv = appctx->ctx.server_state.sv; srv_addr[0] = '\0'; - srv_time_since_last_change = 0; - bk_f_forced_id = 0; - srv_f_forced_id = 0; switch (srv->addr.ss_family) { case AF_INET: