From b1d19eab1c8d6148e286e000291ae116afa1a0f6 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 12 Feb 2021 16:09:13 +0100 Subject: [PATCH] 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. --- src/tcpcheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;