diff options
author | Yang Tse <yangsita@gmail.com> | 2008-11-25 16:26:58 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-11-25 16:26:58 +0000 |
commit | 3b0c5ae46774e8523cb02d6ecb7c2c25ec21e97b (patch) | |
tree | 18e028d5f704f0cbeaf00ebcc41f0f4635636cb9 /ares/ares_gethostbyname.c | |
parent | 0fa14c8662d29a0b6c8274da452df2cb2843ebcf (diff) |
In preparation for the upcomming IPv6 nameservers patch, the internal
ares_addr union is now changed into an internal struct which also holds
the address family.
Diffstat (limited to 'ares/ares_gethostbyname.c')
-rw-r--r-- | ares/ares_gethostbyname.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c index 53ca2d94a..e452142e5 100644 --- a/ares/ares_gethostbyname.c +++ b/ares/ares_gethostbyname.c @@ -432,13 +432,13 @@ static int get_address_index(struct in_addr *addr, struct apattern *sortlist, continue; if (sortlist[i].type == PATTERN_MASK) { - if ((addr->s_addr & sortlist[i].mask.addr.addr4.s_addr) - == sortlist[i].addr.addr4.s_addr) + if ((addr->s_addr & sortlist[i].mask.addr4.s_addr) + == sortlist[i].addrV4.s_addr) break; } else { - if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addr.addr4.s_addr, + if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr, sortlist[i].mask.bits)) break; } @@ -485,7 +485,7 @@ static int get6_address_index(struct in6_addr *addr, struct apattern *sortlist, { if (sortlist[i].family != AF_INET6) continue; - if (!ares_bitncmp(&addr->s6_addr, &sortlist[i].addr.addr6.s6_addr, sortlist[i].mask.bits)) + if (!ares_bitncmp(&addr->s6_addr, &sortlist[i].addrV6.s6_addr, sortlist[i].mask.bits)) break; } return i; |