summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ip.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ip.cpp b/src/ip.cpp
index 77efd29..eebfcb5 100644
--- a/src/ip.cpp
+++ b/src/ip.cpp
@@ -251,7 +251,7 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
}
// Use the first result.
- zmq_assert (res->ai_addrlen <= sizeof (*addr_));
+ zmq_assert ((size_t) (res->ai_addrlen) <= sizeof (*addr_));
memcpy (addr_, res->ai_addr, res->ai_addrlen);
*addr_len_ = res->ai_addrlen;
@@ -303,7 +303,7 @@ int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
}
// Copy first result to output addr with hostname and service.
- zmq_assert (res->ai_addrlen <= sizeof (*addr_));
+ zmq_assert ((size_t) (res->ai_addrlen) <= sizeof (*addr_));
memcpy (addr_, res->ai_addr, res->ai_addrlen);
*addr_len_ = res->ai_addrlen;