Simplify IPv6 compare functions to unconfuse gcc compiler
In file included from src/tcp.c:32:
In function ‘ip_check_is_any_v6’,
inlined from ‘ip_check_is_any’ at src/tcp.h:110:46,
inlined from ‘ip_check_is_local_address’ at src/tcp.c:89:17:
src/tcp.h:105:57: warning: array subscript 1 is outside array bounds of ‘const struct sockaddr_storage[0]’ [-Warray-bounds]
105 | { return ((uint64_t *)IP_AS_V6(address, addr).s6_addr)[0] == ((uint64_t *)(&in6addr_any.s6_addr))[0] &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
src/tcp.h: In function ‘ip_check_is_local_address’:
src/tcp.h:108:19: note: at offset 8 into object ‘address’ of size 8
108 | static inline int ip_check_is_any(const struct sockaddr_storage *address)
| ^~~~~~~~~~~~~~~
And more for the other half of the function and its three-times more or
less copy-paste instances. sockaddr_storage is not an array, but what
we actually do here is access s6_addr – which is an array of uint8_t.
Accessing the 16 uint8_t as 2 uint64_t apparently works, but not doing
it results in hopefully simpler to understand code for both humans and
compilers alike.