summaryrefslogtreecommitdiff
path: root/ares_gethostbyname.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-11-25 16:26:58 (GMT)
committerYang Tse <yangsita@gmail.com>2008-11-25 16:26:58 (GMT)
commitaa1534eb200edb08adcc987db7ea5d3588e43051 (patch)
tree98a737d50df59776ebe724bd087be843e3034ca5 /ares_gethostbyname.c
parente3d86772c41259e8512268b3ffe545385e0f034f (diff)
downloadc-ares-aa1534eb200edb08adcc987db7ea5d3588e43051.zip
c-ares-aa1534eb200edb08adcc987db7ea5d3588e43051.tar.gz
c-ares-aa1534eb200edb08adcc987db7ea5d3588e43051.tar.bz2
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_gethostbyname.c')
-rw-r--r--ares_gethostbyname.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ares_gethostbyname.c b/ares_gethostbyname.c
index 53ca2d9..e452142 100644
--- a/ares_gethostbyname.c
+++ b/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;