BUG/MINOR: checks: return correct error code for srv_parse_agent_check
authorDirkjan Bussink <d.bussink@gmail.com>
Fri, 18 Jun 2021 19:57:49 +0000 (19:57 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Jun 2021 16:27:25 +0000 (18:27 +0200)
commit8b37d8d5cd3e6e3ac9a9aa0e01d43bf2b82030c0
tree90f85e9b063ab1fb761bd4b0fb379ae74f6b5fb8
parent80c8acc59949fcc116cc358decbd46240349ea3a
BUG/MINOR: checks: return correct error code for srv_parse_agent_check

In srv_parse_agent_check the error code is not returned in case
something goes wrong. The value 0 is always return.

Additionally, there's a small cleanup of unreachable returns that in
most checks are not present either and removed in two places they were
present. This makes the code consistent across the different checks.

(cherry picked from commit dfee217b68a241f2723c2a4b67d2af187f0b6690)
[cf: Must be backported as far as 2.2]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1065e7edb7bd1b536bd3de6531463d16000d4956)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/check.c