am 4a7afa48: am e05df251: Merge "Fix a gethnamaddr.c warning that\'s already fixed upstream."

* commit '4a7afa4863668931a7253633ea0d42071598a96f':
  Fix a gethnamaddr.c warning that's already fixed upstream.
This commit is contained in:
Elliott Hughes 2014-05-06 20:49:20 +00:00 committed by Android Git Automerger
commit c46ffbd51e

View File

@ -828,27 +828,27 @@ android_gethostbyaddrfornet_real(const void *addr,
assert(addr != NULL); assert(addr != NULL);
if (af == AF_INET6 && len == IN6ADDRSZ && if (af == AF_INET6 && len == NS_IN6ADDRSZ &&
(IN6_IS_ADDR_LINKLOCAL((const struct in6_addr *)(const void *)uaddr) || (IN6_IS_ADDR_LINKLOCAL((const struct in6_addr *)addr) ||
IN6_IS_ADDR_SITELOCAL((const struct in6_addr *)(const void *)uaddr))) { IN6_IS_ADDR_SITELOCAL((const struct in6_addr *)addr))) {
h_errno = HOST_NOT_FOUND; h_errno = HOST_NOT_FOUND;
return NULL; return NULL;
} }
if (af == AF_INET6 && len == IN6ADDRSZ && if (af == AF_INET6 && len == NS_IN6ADDRSZ &&
(IN6_IS_ADDR_V4MAPPED((const struct in6_addr *)(const void *)uaddr) || (IN6_IS_ADDR_V4MAPPED((const struct in6_addr *)addr) ||
IN6_IS_ADDR_V4COMPAT((const struct in6_addr *)(const void *)uaddr))) { IN6_IS_ADDR_V4COMPAT((const struct in6_addr *)addr))) {
/* Unmap. */ /* Unmap. */
addr += IN6ADDRSZ - INADDRSZ; uaddr += NS_IN6ADDRSZ - NS_INADDRSZ;
uaddr += IN6ADDRSZ - INADDRSZ; addr = uaddr;
af = AF_INET; af = AF_INET;
len = INADDRSZ; len = NS_INADDRSZ;
} }
switch (af) { switch (af) {
case AF_INET: case AF_INET:
size = INADDRSZ; size = NS_INADDRSZ;
break; break;
case AF_INET6: case AF_INET6:
size = IN6ADDRSZ; size = NS_IN6ADDRSZ;
break; break;
default: default:
errno = EAFNOSUPPORT; errno = EAFNOSUPPORT;