summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/inet_ntop.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2023-10-11 18:36:33 +0300
committerdartraiden <wowemuh@gmail.com>2023-10-11 18:38:34 +0300
commitb7dfc6fda6f6b461f45a2ce457911bf128160208 (patch)
tree795d58d5d6d83c483022c3e14640f5999d0c0623 /libs/libcurl/src/inet_ntop.c
parentf40b2ce583f05b0756c4552f2e46535bea2c0c39 (diff)
libcurl: update to 8.4.0
Diffstat (limited to 'libs/libcurl/src/inet_ntop.c')
-rw-r--r--libs/libcurl/src/inet_ntop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/libcurl/src/inet_ntop.c b/libs/libcurl/src/inet_ntop.c
index 90a9453a30..cf07b888dc 100644
--- a/libs/libcurl/src/inet_ntop.c
+++ b/libs/libcurl/src/inet_ntop.c
@@ -96,10 +96,10 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
char *tp;
struct {
- long base;
- long len;
+ int base;
+ int len;
} best, cur;
- unsigned long words[IN6ADDRSZ / INT16SZ];
+ unsigned int words[IN6ADDRSZ / INT16SZ];
int i;
/* Preprocess:
@@ -108,7 +108,7 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
*/
memset(words, '\0', sizeof(words));
for(i = 0; i < IN6ADDRSZ; i++)
- words[i/2] |= (src[i] << ((1 - (i % 2)) << 3));
+ words[i/2] |= ((unsigned int)src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
cur.base = -1;
@@ -159,7 +159,7 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
tp += strlen(tp);
break;
}
- tp += msnprintf(tp, 5, "%lx", words[i]);
+ tp += msnprintf(tp, 5, "%x", words[i]);
}
/* Was it a trailing run of 0x00's?