From d7d3f53df792e6f49b1c7c46af9460a2dc0e44be Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 3 Sep 2022 23:57:54 +0200 Subject: [PATCH] net: Pass true/false instead of 0/1 to makesock(). The function receives a boolean argument, after all. --- dccp_recv.c | 2 +- net.c | 2 +- net.h | 2 +- udp_recv.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dccp_recv.c b/dccp_recv.c index 3e106636..0b20bcc8 100644 --- a/dccp_recv.c +++ b/dccp_recv.c @@ -90,7 +90,7 @@ static int dccp_recv_open(struct receiver_node *rn) OPT_ADD(fo, SOL_DCCP, DCCP_SOCKOPT_CCID, ccids, i); } - fd = makesock(IPPROTO_DCCP, 0, host, port, fo); + fd = makesock(IPPROTO_DCCP, false, host, port, fo); flowopt_cleanup(fo); free(ccids); if (fd < 0) diff --git a/net.c b/net.c index 96950ae9..d6dfa7e3 100644 --- a/net.c +++ b/net.c @@ -870,7 +870,7 @@ int dccp_available_ccids(uint8_t **ccid_array) socklen_t nccids = sizeof(ccids); int ret, fd; - ret = fd = makesock(IPPROTO_DCCP, 1, NULL, 0, NULL); + ret = fd = makesock(IPPROTO_DCCP, true /* passive */, NULL, 0, NULL); if (ret < 0) return ret; diff --git a/net.h b/net.h index e71fe311..d206881c 100644 --- a/net.h +++ b/net.h @@ -42,7 +42,7 @@ int makesock_addrinfo(unsigned l4type, bool passive, struct addrinfo *ai, static inline int para_connect(unsigned l4type, const char *host, uint16_t port) { - return makesock(l4type, 0, host, port, NULL); + return makesock(l4type, false, host, port, NULL); } void extract_v4_addr(const struct sockaddr_storage *ss, struct in_addr *ia); diff --git a/udp_recv.c b/udp_recv.c index 8d1274bc..365b6863 100644 --- a/udp_recv.c +++ b/udp_recv.c @@ -168,7 +168,7 @@ static int udp_recv_open(struct receiver_node *rn) uint32_t port = RECV_CMD_OPT_UINT32_VAL(UDP, PORT, lpr); int ret; - ret = makesock(IPPROTO_UDP, 1, host, port, NULL); + ret = makesock(IPPROTO_UDP, true /* passive */, host, port, NULL); if (ret < 0) return ret; rn->fd = ret; -- 2.39.5