IN6_ARE_ADDR_EQUAL was used only once, replaced it.

This commit is contained in:
irungentoo 2014-06-07 19:47:00 -04:00
parent 550fced157
commit 99572e944a
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 1 additions and 13 deletions

View File

@ -658,7 +658,7 @@ int ip_equal(IP *a, IP *b)
if (a->family == AF_INET)
return (a->ip4.in_addr.s_addr == b->ip4.in_addr.s_addr);
else if (a->family == AF_INET6)
return IN6_ARE_ADDR_EQUAL(&a->ip6.in6_addr, &b->ip6.in6_addr);
return a->ip6.uint64[0] == b->ip6.uint64[0] && a->ip6.uint64[1] == b->ip6.uint64[1];
else
return 0;
}

View File

@ -52,18 +52,6 @@ typedef unsigned int sock_t;
/* sa_family_t is the sockaddr_in / sockaddr_in6 family field */
typedef short sa_family_t;
#ifndef IN6_ARE_ADDR_EQUAL
#ifdef IN6_ADDR_EQUAL
#define IN6_ARE_ADDR_EQUAL(a,b) IN6_ADDR_EQUAL(a,b)
#else
#define IN6_ARE_ADDR_EQUAL(a,b) \
((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \
&& (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \
&& (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \
&& (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))
#endif
#endif
#ifndef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
#endif