diff options
author | Angelo Mantellini <angelo.mantellini@cisco.com> | 2020-01-30 10:44:19 +0100 |
---|---|---|
committer | Angelo Mantellini <angelo.mantellini@cisco.com> | 2020-02-03 10:18:52 +0000 |
commit | 55f2219ab98b039f256671c5e584a61ab52bfed0 (patch) | |
tree | d97fbf6a57dfdb4335bba979f27bd18f4999c492 /lib/src/util | |
parent | be54ac541c9700eaa9085bc8b4ee21b7a5f7e30a (diff) |
[HICN-489] Add iOS support to hicn stack
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com>
Change-Id: I8fa8c4eaa3218eb4be46f713b15ab789c6930aa0
Diffstat (limited to 'lib/src/util')
-rw-r--r-- | lib/src/util/ip_address.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |