Differences From Artifact [7ddc4e62c4]:
- File src/resolver.m — part of check-in [7e5c81e186] at 2018-01-03 19:49:46 on branch trunk — Update copyright notice (user: js, size: 8766) [annotate] [blame] [check-ins using]
To Artifact [fa7a0544ce]:
- File
src/resolver.m
— part of check-in
[cd9635897c]
at
2018-03-10 19:41:25
on branch trunk
— resolver.m: Cast h_addr_list to char **
On AmigaOS 4, this is __BYTE **, causing a warning without the cast. (user: js, size: 8784) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
193 194 195 196 197 198 199 | if ((he = gethostbyname((const void *)[host UTF8String])) == NULL || he->h_addrtype != AF_INET) @throw [OFAddressTranslationFailedException exceptionWithHost: host error: h_errno]; count = 0; | | | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | if ((he = gethostbyname((const void *)[host UTF8String])) == NULL || he->h_addrtype != AF_INET) @throw [OFAddressTranslationFailedException exceptionWithHost: host error: h_errno]; count = 0; for (ip = (char **)he->h_addr_list; *ip != NULL; ip++) count++; if (count == 0) @throw [OFAddressTranslationFailedException exceptionWithHost: host]; if ((ret = calloc(count + 1, sizeof(*ret))) == NULL) |
︙ | ︙ | |||
220 221 222 223 224 225 226 | free(ret); free(results); @throw [OFOutOfMemoryException exceptionWithRequestedSize: count * sizeof(*addrs)]; } for (retIter = ret, resultsIter = results, addrsIter = addrs, | | | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | free(ret); free(results); @throw [OFOutOfMemoryException exceptionWithRequestedSize: count * sizeof(*addrs)]; } for (retIter = ret, resultsIter = results, addrsIter = addrs, ip = (char **)he->h_addr_list; *ip != NULL; retIter++, resultsIter++, addrsIter++, ip++) { addrsIter->sin_family = he->h_addrtype; addrsIter->sin_port = OF_BSWAP16_IF_LE(port); if ((size_t)he->h_length > sizeof(addrsIter->sin_addr.s_addr)) @throw [OFOutOfRangeException exception]; |
︙ | ︙ |