QUIC: fixed macro style.

This commit is contained in:
Vladimir Homutov 2022-01-25 15:48:05 +03:00
parent c403822674
commit 264dd955cb
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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)