{px->lbprm.algo & BE_LB_PROP_DYN) is checked by
the immediate outer if clause, so there is no need
to check it a second time.

Signed-off-by: Simon Horman <[email protected]>
---
 src/dumpstats.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dumpstats.c b/src/dumpstats.c
index 1f875c0..863de8e 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -942,7 +942,7 @@ static int stats_sock_parse_weight_change_request(struct 
stream_interface *si,
 
        if (px->lbprm.algo & BE_LB_PROP_DYN) {
        /* we must take care of not pushing the server to full throttle during 
slow starts */
-               if ((sv->state & SRV_WARMINGUP) && (px->lbprm.algo & 
BE_LB_PROP_DYN))
+               if ((sv->state & SRV_WARMINGUP))
                        sv->eweight = (BE_WEIGHT_SCALE * (now.tv_sec - 
sv->last_change) + sv->slowstart - 1) / sv->slowstart;
                else
                        sv->eweight = BE_WEIGHT_SCALE;
-- 
1.7.10.4


Reply via email to