]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: sockpair: do not set unused flag
authorWilly Tarreau <w@1wt.eu>
Fri, 17 Sep 2021 09:56:25 +0000 (11:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Sep 2021 09:56:25 +0000 (11:56 +0200)
Ilya reports in GH #1392 that clang 13 complains about a flag being added
to the "flags" parameter without being used later. That's generic code
that was shared from TCP but we can indeed drop this flag since it's used
for TFO which we don't have in socketpairs.

src/proto_sockpair.c

index 0cb9ab1e9bd35a99b30fde28ab7bb1d52291c1eb..0357552baa719dc59ad2af6e5715aa3ae223969f 100644 (file)
@@ -331,10 +331,6 @@ static int sockpair_connect_server(struct connection *conn, int flags)
                return SF_ERR_INTERNAL;
        }
 
-       /* if a send_proxy is there, there are data */
-       if (conn->send_proxy_ofs)
-               flags |= CONNECT_HAS_DATA;
-
        if (global.tune.server_sndbuf)
                 setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &global.tune.server_sndbuf, sizeof(global.tune.server_sndbuf));