summaryrefslogtreecommitdiff
path: root/lib/inet_pton.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2004-12-17 20:18:53 +0000
committerDan Fandrich <dan@coneharvesters.com>2004-12-17 20:18:53 +0000
commita07dcfd8507482bf7a2f9c83ed16d1107f056188 (patch)
treef2e6a3611878c47f6ed70f5d51d6676d01d8675d /lib/inet_pton.c
parent321511a5befd6791683f34a39af381d5153ee236 (diff)
downloadcurl-a07dcfd8507482bf7a2f9c83ed16d1107f056188.tar.gz
Renamed a variable to avoid conflict with a C++ reserved word.
Diffstat (limited to 'lib/inet_pton.c')
-rw-r--r--lib/inet_pton.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/inet_pton.c b/lib/inet_pton.c
index 9eb199af5..e8d4636b3 100644
--- a/lib/inet_pton.c
+++ b/lib/inet_pton.c
@@ -74,13 +74,13 @@ Curl_inet_pton(int af, const char *src, void *dst)
{
switch (af) {
case AF_INET:
- return (inet_pton4(src, dst));
+ return (inet_pton4(src, (unsigned char *)dst));
#ifdef ENABLE_IPV6
#ifndef AF_INET6
-#define AF_INET6 AF_MAX+1 /* just to let this compile */
+#define AF_INET6 (AF_MAX+1) /* just to let this compile */
#endif
case AF_INET6:
- return (inet_pton6(src, dst));
+ return (inet_pton6(src, (unsigned char *)dst));
#endif
default:
errno = EAFNOSUPPORT;
@@ -114,11 +114,11 @@ inet_pton4(const char *src, unsigned char *dst)
const char *pch;
if ((pch = strchr(digits, ch)) != NULL) {
- u_int new = *tp * 10 + (pch - digits);
+ u_int val = *tp * 10 + (pch - digits);
- if (new > 255)
+ if (val > 255)
return (0);
- *tp = new;
+ *tp = val;
if (! saw_digit) {
if (++octets > 4)
return (0);