]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: server: remove ambiguous check in srv_update_addr_port()
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 22 Dec 2023 13:42:22 +0000 (14:42 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 2 Jan 2024 09:29:24 +0000 (10:29 +0100)
A leftover check was left by recent patch series about server
addr:svc_port propagation: a check on (msg) being set was performed
in srv_update_addr_port(), but msg is always set, so the check is not
needed and confuses coverity (See GH #2399)

src/server.c

index 6a082fcb0f8bb5b04c6df7c6a33952bb37969e66..bc838b3b988edb2166bf0b5e4fb18cbb48abf16c 100644 (file)
@@ -4167,8 +4167,7 @@ const char *srv_update_addr_port(struct server *s, const char *addr, const char
         * s->svc_port is only relevant under inet context
        */
        if ((s->addr.ss_family != AF_INET) && (s->addr.ss_family != AF_INET6)) {
-               if (msg)
-                       chunk_printf(msg, "Update for the current server address family is only supported through configuration file.");
+               chunk_printf(msg, "Update for the current server address family is only supported through configuration file.");
                goto out;
        }