From: Christopher Faulet Date: Fri, 12 Feb 2021 15:09:13 +0000 (+0100) Subject: CLEANUP: tcpcheck: Remove a useless test on port variable X-Git-Tag: v2.4-dev8~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1d19eab1c8d6148e286e000291ae116afa1a0f6;p=thirdparty%2Fhaproxy.git CLEANUP: tcpcheck: Remove a useless test on port variable When a connect rule is evaluated a test is performed on the "port" variable while it is set to 0 just on the line just above. Just remove this useless test to make ccpcheck happy. This patch fixes the issue #1113. --- diff --git a/src/tcpcheck.c b/src/tcpcheck.c index 100c727397..82f7b02e61 100644 --- a/src/tcpcheck.c +++ b/src/tcpcheck.c @@ -1045,7 +1045,7 @@ enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct tcpchec proto = protocol_by_family(conn->dst->ss_family); port = 0; - if (!port && connect->port) + if (connect->port) port = connect->port; if (!port && connect->port_expr) { struct sample *smp;