Small bug fix and warning removal.

This commit is contained in:
Adam Ierymenko 2016-11-18 13:01:45 -08:00
parent 2ea9f516e1
commit 25f9c294dc
2 changed files with 8 additions and 6 deletions

View file

@ -427,7 +427,7 @@ struct InetAddress : public sockaddr_storage
} else {
unsigned long tmp = reinterpret_cast<const struct sockaddr_in6 *>(this)->sin6_port;
const uint8_t *a = reinterpret_cast<const uint8_t *>(this);
for(long i=0;i<sizeof(InetAddress);++i)
for(long i=0;i<(long)sizeof(InetAddress);++i)
reinterpret_cast<uint8_t *>(&tmp)[i % sizeof(tmp)] ^= a[i];
return tmp;
}