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.
This commit is contained in:
Christopher Faulet 2021-02-12 16:09:13 +01:00
parent b4d3708cb7
commit b1d19eab1c
1 changed files with 1 additions and 1 deletions

View File

@ -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;