From 55f2219ab98b039f256671c5e584a61ab52bfed0 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Thu, 30 Jan 2020 10:44:19 +0100 Subject: [HICN-489] Add iOS support to hicn stack Signed-off-by: Angelo Mantellini Change-Id: I8fa8c4eaa3218eb4be46f713b15ab789c6930aa0 --- lib/src/util/ip_address.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/src/util/ip_address.c') diff --git a/lib/src/util/ip_address.c b/lib/src/util/ip_address.c index 49818de40..805b0b261 100644 --- a/lib/src/util/ip_address.c +++ b/lib/src/util/ip_address.c @@ -91,10 +91,10 @@ ip_address_ntop (const ip_address_t * ip_address, char *dst, const size_t len, const char * s; switch(family) { case AF_INET: - s = inet_ntop (AF_INET, ip_address->v4.buffer, dst, len); + s = inet_ntop (AF_INET, ip_address->v4.buffer, dst, (socklen_t)len); break; case AF_INET6: - s = inet_ntop (AF_INET6, ip_address->v6.buffer, dst, len); + s = inet_ntop (AF_INET6, ip_address->v6.buffer, dst, (socklen_t)len); break; default: return -1; @@ -156,7 +156,7 @@ ip_address_snprintf(char * s, size_t size, const ip_address_t * ip_address, int } if (!rc) return -1; - return strlen(s); + return (int)strlen(s); } int @@ -281,7 +281,7 @@ ip_prefix_ntop_short(const ip_prefix_t * ip_prefix, char *dst, size_t size) return -1; int rc = snprintf(dst, size, "%s", ip_s); if (rc >= size) - return size; + return (int)size; return rc; } @@ -304,7 +304,7 @@ ip_prefix_ntop(const ip_prefix_t * ip_prefix, char *dst, size_t size) return -1; int rc = snprintf(dst, size, "%s/%d", ip_s, ip_prefix->len); if (rc >= size) - return size; + return (int)size; return rc; } -- cgit 1.2.3-korg