aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/util/ip_address.c
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2020-02-03 10:38:56 +0000
committerGerrit Code Review <gerrit@fd.io>2020-02-03 10:38:56 +0000
commite90a3ec9cbc98d73dfeb2175ee12edfb56af11ee (patch)
tree77b833e5189847e84933ce3269aaa05ffda24138 /lib/src/util/ip_address.c
parentb289a24a07d9fe67e8cd9ea0247987e009df6d50 (diff)
parent55f2219ab98b039f256671c5e584a61ab52bfed0 (diff)
Merge "[HICN-489] Add iOS support to hicn stack"
Diffstat (limited to 'lib/src/util/ip_address.c')
-rw-r--r--lib/src/util/ip_address.c10
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;
}