Skip to content

Commit

Permalink
QUIC: fixed macro style.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlhomutov committed Jan 25, 2022
1 parent c403822 commit 264dd95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/event/quic/ngx_event_quic_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/os/unix/ngx_udp_sendmsg_chain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 264dd95

Please sign in to comment.