zwoop commented on code in PR #11285:
URL: https://github.com/apache/trafficserver/pull/11285#discussion_r1576971471
##########
src/iocore/net/UnixUDPNet.cc:
##########
@@ -504,33 +502,31 @@
UDPNetProcessorInternal::read_multiple_messages_from_net(UDPNetHandler *nh, UDPC
UnixUDPConnection *uc = (UnixUDPConnection *)xuc;
std::array<Ptr<IOBufferBlock>, MAX_RECEIVE_MSG_PER_CALL> buffer_chain;
- unsigned max_niov = 32;
- int64_t gso_size{0}; // In case is available
+ unsigned max_niov = 32;
+ int64_t gso_size{0}; // In
case is available
struct mmsghdr mmsg[MAX_RECEIVE_MSG_PER_CALL];
- struct iovec tiovec[MAX_RECEIVE_MSG_PER_CALL][max_niov];
+ struct iovec tiovec[MAX_RECEIVE_MSG_PER_CALL][max_niov];
// Addresses
sockaddr_in6 fromaddr[MAX_RECEIVE_MSG_PER_CALL];
sockaddr_in6 toaddr[MAX_RECEIVE_MSG_PER_CALL];
- int toaddr_len = sizeof(toaddr);
+ int toaddr_len = sizeof(toaddr);
size_t total_bytes_read{0};
- static const size_t cmsg_size
- {
- CMSG_SPACE(sizeof(int))
+ static const size_t cmsg_size{CMSG_SPACE(sizeof(int))
Review Comment:
Actually no, this looks like it actually fixed a bug in previous versions of
clang-format, this is an initializer, and not a function:
```
static const size_t cmsg_size{CMSG_SPACE(sizeof(int))
#ifdef IP_PKTINFO
+ CMSG_SPACE(sizeof(struct in_pktinfo))
#endif
#if defined(IPV6_PKTINFO) || defined(IPV6_RECVPKTINFO)
+ CMSG_SPACE(sizeof(struct in6_pktinfo))
#endif
#ifdef IP_RECVDSTADDR
+ CMSG_SPACE(sizeof(struct in_addr))
#endif
#ifdef UDP_GRO
+ CMSG_SPACE(sizeof(uint16_t))
#endif
};
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]