diff options
| -rw-r--r-- | lib/inet_ntop.c | 10 | ||||
| -rw-r--r-- | lib/inet_pton.c | 4 | 
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index bbe837653..c3b55c02d 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -68,9 +68,9 @@   * Returns `dst' (as a const)   * Note:   *  - uses no statics - *  - takes a u_char* not an in_addr as input + *  - takes a unsigned char* not an in_addr as input   */ -static char *inet_ntop4 (const u_char *src, char *dst, size_t size) +static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size)  {  #if defined(HAVE_INET_NTOA_R_2_ARGS)    const char *ptr; @@ -97,7 +97,7 @@ static char *inet_ntop4 (const u_char *src, char *dst, size_t size)  /*   * Convert IPv6 binary address into presentation (printable) format.   */ -static char *inet_ntop6 (const u_char *src, char *dst, size_t size) +static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)  {    /*     * Note that int32_t and int16_t need only be "at least" large enough @@ -208,10 +208,10 @@ char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)  {    switch (af) {    case AF_INET: -    return inet_ntop4((const u_char*)src, buf, size); +    return inet_ntop4((const unsigned char*)src, buf, size);  #ifdef ENABLE_IPV6    case AF_INET6: -    return inet_ntop6((const u_char*)src, buf, size); +    return inet_ntop6((const unsigned char*)src, buf, size);  #endif    default:      SET_ERRNO(EAFNOSUPPORT); diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 35eef49d0..c290330cb 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -114,7 +114,7 @@ inet_pton4(const char *src, unsigned char *dst)      const char *pch;      if ((pch = strchr(digits, ch)) != NULL) { -      u_int val = *tp * 10 + (u_int)(pch - digits); +      unsigned int val = *tp * 10 + (unsigned int)(pch - digits);        if (val > 255)          return (0); @@ -161,7 +161,7 @@ inet_pton6(const char *src, unsigned char *dst)    unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;    const char *xdigits, *curtok;    int ch, saw_xdigit; -  u_int val; +  unsigned int val;    memset((tp = tmp), 0, IN6ADDRSZ);    endp = tp + IN6ADDRSZ;  | 
