aboutsummaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-05-06 20:42:10 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-06 20:42:10 +0000
commite05df25145eda8ca59db5eb03cf5dbf8c7714870 (patch)
treecf8db85e7a469d3c66c13da32a721fa1d0e6d0a9 /libc
parent89ca3c5aec19b3fa9bdc9982e31c0516d6077797 (diff)
parent3e5f0c9849bf09ad9a5b1999430aec796276d9f6 (diff)
downloadandroid_bionic-e05df25145eda8ca59db5eb03cf5dbf8c7714870.tar.gz
android_bionic-e05df25145eda8ca59db5eb03cf5dbf8c7714870.tar.bz2
android_bionic-e05df25145eda8ca59db5eb03cf5dbf8c7714870.zip
Merge "Fix a gethnamaddr.c warning that's already fixed upstream."
Diffstat (limited to 'libc')
-rw-r--r--libc/dns/gethnamaddr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libc/dns/gethnamaddr.c b/libc/dns/gethnamaddr.c
index dbcadee72..4da99b2fe 100644
--- a/libc/dns/gethnamaddr.c
+++ b/libc/dns/gethnamaddr.c
@@ -828,27 +828,27 @@ android_gethostbyaddrfornet_real(const void *addr,
assert(addr != NULL);
- if (af == AF_INET6 && len == IN6ADDRSZ &&
- (IN6_IS_ADDR_LINKLOCAL((const struct in6_addr *)(const void *)uaddr) ||
- IN6_IS_ADDR_SITELOCAL((const struct in6_addr *)(const void *)uaddr))) {
+ if (af == AF_INET6 && len == NS_IN6ADDRSZ &&
+ (IN6_IS_ADDR_LINKLOCAL((const struct in6_addr *)addr) ||
+ IN6_IS_ADDR_SITELOCAL((const struct in6_addr *)addr))) {
h_errno = HOST_NOT_FOUND;
return NULL;
}
- if (af == AF_INET6 && len == IN6ADDRSZ &&
- (IN6_IS_ADDR_V4MAPPED((const struct in6_addr *)(const void *)uaddr) ||
- IN6_IS_ADDR_V4COMPAT((const struct in6_addr *)(const void *)uaddr))) {
+ if (af == AF_INET6 && len == NS_IN6ADDRSZ &&
+ (IN6_IS_ADDR_V4MAPPED((const struct in6_addr *)addr) ||
+ IN6_IS_ADDR_V4COMPAT((const struct in6_addr *)addr))) {
/* Unmap. */
- addr += IN6ADDRSZ - INADDRSZ;
- uaddr += IN6ADDRSZ - INADDRSZ;
+ uaddr += NS_IN6ADDRSZ - NS_INADDRSZ;
+ addr = uaddr;
af = AF_INET;
- len = INADDRSZ;
+ len = NS_INADDRSZ;
}
switch (af) {
case AF_INET:
- size = INADDRSZ;
+ size = NS_INADDRSZ;
break;
case AF_INET6:
- size = IN6ADDRSZ;
+ size = NS_IN6ADDRSZ;
break;
default:
errno = EAFNOSUPPORT;