fix undefined shift operations on signed integers

This commit is contained in:
Miroslav Lichvar
2015-12-17 12:08:57 +01:00
parent e5a593f013
commit 69642dd440
3 changed files with 4 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ split_ip6(IPAddr *ip, uint32_t *dst)
int i;
for (i = 0; i < 4; i++)
dst[i] = ip->addr.in6[i * 4 + 0] << 24 |
dst[i] = (uint32_t)ip->addr.in6[i * 4 + 0] << 24 |
ip->addr.in6[i * 4 + 1] << 16 |
ip->addr.in6[i * 4 + 2] << 8 |
ip->addr.in6[i * 4 + 3];