From: Otto Moerbeek Date: Mon, 6 May 2024 09:19:13 +0000 (+0200) Subject: remove struct so that clang-format does not insists laying out the var init over... X-Git-Tag: rec-5.1.0-alpha1~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14097%2Fhead;p=thirdparty%2Fpdns.git remove struct so that clang-format does not insists laying out the var init over three lines. --- diff --git a/pdns/iputils.hh b/pdns/iputils.hh index b13f825eab..ba088b6e4e 100644 --- a/pdns/iputils.hh +++ b/pdns/iputils.hh @@ -85,10 +85,8 @@ union ComboAddress { - struct sockaddr_in sin4 - { - }; - struct sockaddr_in6 sin6; + sockaddr_in sin4{}; + sockaddr_in6 sin6; bool operator==(const ComboAddress& rhs) const { @@ -1886,7 +1884,7 @@ bool IsAnyAddress(const ComboAddress& addr); bool HarvestDestinationAddress(const struct msghdr* msgh, ComboAddress* destination); bool HarvestTimestamp(struct msghdr* msgh, struct timeval* timeval); void fillMSGHdr(struct msghdr* msgh, struct iovec* iov, cmsgbuf_aligned* cbuf, size_t cbufsize, char* data, size_t datalen, ComboAddress* addr); -int sendOnNBSocket(int fd, const struct msghdr *msgh); +int sendOnNBSocket(int fileDesc, const struct msghdr* msgh); size_t sendMsgWithOptions(int socketDesc, const void* buffer, size_t len, const ComboAddress* dest, const ComboAddress* local, unsigned int localItf, int flags); /* requires a non-blocking, connected TCP socket */