bool HarvestTimestamp(struct msghdr* msgh, struct timeval* timeval)
{
- // NOLINTBEGIN(cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-type-const-cast, cppcoreguidelines-pro-type-reinterpret-cast)
+ // NOLINTBEGIN(cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-type-const-cast, cppcoreguidelines-pro-type-reinterpret-cast)
#ifdef SO_TIMESTAMP
struct cmsghdr* cmsg{};
for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != nullptr; cmsg = CMSG_NXTHDR(msgh, cmsg)) {
}
}
return false;
- // NOLINTEND(cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-type-const-cast, cppcoreguidelines-pro-type-reinterpret-cast)
+ // NOLINTEND(cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-type-const-cast, cppcoreguidelines-pro-type-reinterpret-cast)
}
bool IsAnyAddress(const ComboAddress& addr)
if (bits >= 128) {
return;
}
- start = reinterpret_cast<uint8_t*>(&sin6.sin6_addr.s6_addr); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
+ start = reinterpret_cast<uint8_t*>(&sin6.sin6_addr.s6_addr); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
len = 16;
}
union ComboAddress
{
- struct sockaddr_in sin4{};
+ struct sockaddr_in sin4
+ {
+ };
struct sockaddr_in6 sin6;
bool operator==(const ComboAddress& rhs) const
{
std::array<char, 1024> host{};
if (sin4.sin_family != 0) {
- // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
int retval = getnameinfo(reinterpret_cast<const struct sockaddr*>(this), getSocklen(), host.data(), host.size(), nullptr, 0, NI_NUMERICHOST);
if (retval == 0) {
return host.data();
}
}
else if (sin4.sin_family == AF_INET6) {
- const auto *ret = inet_ntop(sin4.sin_family, &sin6.sin6_addr, host.data(), host.size());
+ const auto* ret = inet_ntop(sin4.sin_family, &sin6.sin6_addr, host.data(), host.size());
if (ret != nullptr) {
return host.data();
}
return false;
}
}
- if (isIPv6()) {
+ if (isIPv6()) {
if (bit >= 128 || bit < (128 - d_bits)) {
return false;
}
{
public:
using value_type = node_type;
- using reference = node_type &;
- using pointer = node_type *;
+ using reference = node_type&;
+ using pointer = node_type*;
using iterator_category = std::forward_iterator_tag;
using difference_type = size_type;