]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: httpclient: Remove useless test on ss_dst in httpclient_applet_init()
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 May 2022 07:29:32 +0000 (09:29 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 May 2022 07:29:33 +0000 (09:29 +0200)
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.

src/http_client.c

index 53086a3aa1b037ce26772f66cc66eb651b369c87..160ea1b93a7ea7923884e546f1f9bd585298d8b1 100644 (file)
@@ -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;