projects
/
platform
/
upstream
/
c-ares.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d44b54
)
inet_pton: fix compiler warning
author
Yang Tse
<yangsita@gmail.com>
Thu, 25 Nov 2010 01:19:36 +0000
(
02:19
+0100)
committer
Yang Tse
<yangsita@gmail.com>
Thu, 25 Nov 2010 01:19:36 +0000
(
02:19
+0100)
inet_net_pton.c
patch
|
blob
|
history
diff --git
a/inet_net_pton.c
b/inet_net_pton.c
index
8e8a42c
..
0b2accf
100644
(file)
--- 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)
;
-
in
t 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;
}