diff options
author | Yang Tse <yangsita@gmail.com> | 2010-11-25 02:19:36 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2010-11-25 02:19:36 +0100 |
commit | e9e8b6e8643237c49d58e0f1c5326529c83b901f (patch) | |
tree | e33bc720625418d069528bed2b1d65615c277413 /inet_net_pton.c | |
parent | 4d44b54c75dfa0b64fcfb55362f54b54ec956059 (diff) | |
download | c-ares-e9e8b6e8643237c49d58e0f1c5326529c83b901f.tar.gz c-ares-e9e8b6e8643237c49d58e0f1c5326529c83b901f.tar.bz2 c-ares-e9e8b6e8643237c49d58e0f1c5326529c83b901f.zip |
inet_pton: fix compiler warning
Diffstat (limited to 'inet_net_pton.c')
-rw-r--r-- | inet_net_pton.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inet_net_pton.c b/inet_net_pton.c index 8e8a42c..0b2accf 100644 --- a/inet_net_pton.c +++ b/inet_net_pton.c @@ -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; } |