From: Christopher Faulet Date: Wed, 18 May 2022 07:29:32 +0000 (+0200) Subject: CLEANUP: httpclient: Remove useless test on ss_dst in httpclient_applet_init() X-Git-Tag: v2.6-dev11~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f229e1894cc550b94c87e2b8f00e9b398f8d3edd;p=thirdparty%2Fhaproxy.git CLEANUP: httpclient: Remove useless test on ss_dst in httpclient_applet_init() In httpclient_applet_init() function, ss_dst variable is always defined before the call to sockaddr_alloc(). There is no reason to test it. This patch should fix the issue #1706. --- diff --git a/src/http_client.c b/src/http_client.c index 53086a3aa1..160ea1b93a 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -971,11 +971,6 @@ static int httpclient_applet_init(struct appctx *appctx) sock_inet_set_port(ss_dst, port); } - if (!ss_dst) { - ha_alert("httpclient: Failed to initialize address %s:%d.\n", __FUNCTION__, __LINE__); - goto out_error; - } - if (!sockaddr_alloc(&addr, ss_dst, sizeof(*ss_dst))) goto out_error;