]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: dumpstats: Removing useless variables allocation
authorErwan Velu <erwan@redhat.com>
Tue, 30 Aug 2016 09:48:44 +0000 (11:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Aug 2016 12:24:48 +0000 (14:24 +0200)
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.

src/dumpstats.c

index c88d0acbd039608216740d325ae257f32592e117..6c8e3ee57b398645b85a62961515cb92cf51102b 100644 (file)
@@ -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: