]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: sock: Wrap `accept4_broken = 1` into additional parenthesis
authorTim Duesterhus <tim@bastelstu.be>
Sat, 20 Nov 2021 13:39:47 +0000 (14:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 20 Nov 2021 13:52:01 +0000 (14:52 +0100)
This makes it clear to static analysis tools that this assignment is
intentional and not a mistyped comparison.

src/sock.c

index e3d4a6e4c1accb9c640239b6b7bbad36fbdf2383..f11c5b0c4a0337a8a9d7fc7d0f18d2cd1b776e3f 100644 (file)
@@ -74,7 +74,7 @@ struct connection *sock_accept_conn(struct listener *l, int *status)
            (((cfd = accept4(l->rx.fd, (struct sockaddr*)addr, &laddr,
                             SOCK_NONBLOCK | (master ? SOCK_CLOEXEC : 0))) == -1) &&
             (errno == ENOSYS || errno == EINVAL || errno == EBADF) &&
-            (accept4_broken = 1)))
+            ((accept4_broken = 1))))
 #endif
        {
                laddr = sizeof(*conn->src);