mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 03:56:54 +02:00
Fix compiler warnings in Linux build.
This commit is contained in:
parent
c17082a4f8
commit
01d13c153d
1 changed files with 3 additions and 5 deletions
|
@ -613,11 +613,9 @@ std::set<InetAddress> EthernetTap::ips() const
|
|||
case AF_INET6: {
|
||||
struct sockaddr_in6 *sin = (struct sockaddr_in6 *)p->ifa_addr;
|
||||
struct sockaddr_in6 *nm = (struct sockaddr_in6 *)p->ifa_netmask;
|
||||
r.insert(InetAddress(sin->sin6_addr.s6_addr,16,
|
||||
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[0]) +
|
||||
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[1]) +
|
||||
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[2]) +
|
||||
Utils::countBits(((const uint32_t *)(nm->sin6_addr.s6_addr))[3])));
|
||||
uint32_t b[4];
|
||||
memcpy(b,nm->sin6_addr.s6_addr,sizeof(b));
|
||||
r.insert(InetAddress(sin->sin6_addr.s6_addr,16,Utils::countBits(b[0]) + Utils::countBits(b[1]) + Utils::countBits(b[2]) + Utils::countBits(b[3])));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue