Fix warning with pointer compare to zero for IPV6 peer == INADDR_ANY in test.h. Fixes issue #1350.

This commit is contained in:
David Garske 2018-02-05 11:03:19 -08:00
parent 0765aa0f20
commit 1ca56f97a4

View File

@ -695,8 +695,9 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
#else
addr->sin6_family = AF_INET_V;
addr->sin6_port = XHTONS(port);
if (peer == INADDR_ANY)
if ((size_t)peer != INADDR_ANY) {
addr->sin6_addr = in6addr_any;
}
else {
#ifdef HAVE_GETADDRINFO
struct addrinfo hints;