]> granicus.if.org Git - curl/commitdiff
Renamed a variable to avoid conflict with a C++ reserved word.
authorDan Fandrich <dan@coneharvesters.com>
Fri, 17 Dec 2004 20:18:53 +0000 (20:18 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 17 Dec 2004 20:18:53 +0000 (20:18 +0000)
lib/inet_pton.c

index 9eb199af5a24a6e38d7fe04be6b38ac89ff9104d..e8d4636b32716fc6a39929a794f99807a5b46b29 100644 (file)
@@ -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);