From 264dd955cb81dff66908556b5ed8ebbd5cac8ef8 Mon Sep 17 00:00:00 2001 From: Vladimir Homutov Date: Tue, 25 Jan 2022 15:48:05 +0300 Subject: [PATCH] QUIC: fixed macro style. --- src/event/quic/ngx_event_quic_output.c | 8 ++++---- src/os/unix/ngx_udp_sendmsg_chain.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index bf43f7883..da75aa3de 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -405,7 +405,7 @@ ngx_quic_send_segments(ngx_connection_t *c, u_char *buf, size_t len, struct msghdr msg; struct cmsghdr *cmsg; -#if defined(NGX_HAVE_ADDRINFO_CMSG) +#if (NGX_HAVE_ADDRINFO_CMSG) char msg_control[CMSG_SPACE(sizeof(uint16_t)) + CMSG_SPACE(sizeof(ngx_addrinfo_t))]; #else @@ -438,7 +438,7 @@ ngx_quic_send_segments(ngx_connection_t *c, u_char *buf, size_t len, valp = (void *) CMSG_DATA(cmsg); *valp = segment; -#if defined(NGX_HAVE_ADDRINFO_CMSG) +#if (NGX_HAVE_ADDRINFO_CMSG) if (c->listening && c->listening->wildcard && c->local_sockaddr) { cmsg = CMSG_NXTHDR(&msg, cmsg); clen += ngx_set_srcaddr_cmsg(cmsg, c->local_sockaddr); @@ -719,7 +719,7 @@ ngx_quic_send(ngx_connection_t *c, u_char *buf, size_t len, ssize_t n; struct iovec iov; struct msghdr msg; -#if defined(NGX_HAVE_ADDRINFO_CMSG) +#if (NGX_HAVE_ADDRINFO_CMSG) struct cmsghdr *cmsg; char msg_control[CMSG_SPACE(sizeof(ngx_addrinfo_t))]; #endif @@ -735,7 +735,7 @@ ngx_quic_send(ngx_connection_t *c, u_char *buf, size_t len, msg.msg_name = sockaddr; msg.msg_namelen = socklen; -#if defined(NGX_HAVE_ADDRINFO_CMSG) +#if (NGX_HAVE_ADDRINFO_CMSG) if (c->listening && c->listening->wildcard && c->local_sockaddr) { msg.msg_control = msg_control; diff --git a/src/os/unix/ngx_udp_sendmsg_chain.c b/src/os/unix/ngx_udp_sendmsg_chain.c index b29b8d318..e9e6f7091 100644 --- a/src/os/unix/ngx_udp_sendmsg_chain.c +++ b/src/os/unix/ngx_udp_sendmsg_chain.c @@ -208,7 +208,7 @@ ngx_sendmsg_vec(ngx_connection_t *c, ngx_iovec_t *vec) { struct msghdr msg; -#if defined(NGX_HAVE_ADDRINFO_CMSG) +#if (NGX_HAVE_ADDRINFO_CMSG) struct cmsghdr *cmsg; u_char msg_control[CMSG_SPACE(sizeof(ngx_addrinfo_t))]; #endif @@ -223,7 +223,7 @@ ngx_sendmsg_vec(ngx_connection_t *c, ngx_iovec_t *vec) msg.msg_iov = vec->iovs; msg.msg_iovlen = vec->count; -#if defined(NGX_HAVE_ADDRINFO_CMSG) +#if (NGX_HAVE_ADDRINFO_CMSG) if (c->listening && c->listening->wildcard && c->local_sockaddr) { msg.msg_control = msg_control; @@ -240,7 +240,7 @@ ngx_sendmsg_vec(ngx_connection_t *c, ngx_iovec_t *vec) } -#if defined(NGX_HAVE_ADDRINFO_CMSG) +#if (NGX_HAVE_ADDRINFO_CMSG) size_t ngx_set_srcaddr_cmsg(struct cmsghdr *cmsg, struct sockaddr *local_sockaddr)