1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-12-08 12:43:32 +00:00

inet_pton: fix compiler warning

This commit is contained in:
Yang Tse
2010-11-25 02:19:36 +01:00
parent 4d44b54c75
commit e9e8b6e864

View File

@ -364,14 +364,14 @@ inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size)
* Since some memmove()'s erroneously fail to handle
* overlapping regions, we'll do the shift by hand.
*/
const int n = (int)(tp - colonp);
int i;
const ssize_t n = tp - colonp;
ssize_t i;
if (tp == endp)
goto enoent;
for (i = 1; i <= n; i++) {
endp[- i] = colonp[n - i];
colonp[n - i] = 0;
*(endp - i) = *(colonp + n - i);
*(colonp + n - i) = 0;
}
tp = endp;
}