]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: sockpair: silence a coverity check about fcntl()
authorWilly Tarreau <w@1wt.eu>
Fri, 5 Mar 2021 13:31:52 +0000 (14:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Mar 2021 13:33:13 +0000 (14:33 +0100)
This is about coverity complaining that we didn't check the fcntl call
which can't fail, let's consume it. This is issue #1158.

src/proto_sockpair.c

index ca4fc6d8b4c54441b2c65ad78466e2bc0d5033ea..306213e77dfc6afaa97d5a142c5a183b5d0fd998 100644 (file)
@@ -479,7 +479,7 @@ struct connection *sockpair_accept_conn(struct listener *l, int *status)
        int cfd;
 
        if ((cfd = recv_fd_uxst(l->rx.fd)) != -1)
-               fcntl(cfd, F_SETFL, O_NONBLOCK);
+               DISGUISE(fcntl(cfd, F_SETFL, O_NONBLOCK));
 
        if (likely(cfd != -1)) {
                /* Perfect, the connection was accepted */