net/SocketAddress: add cast to size_type

This commit is contained in:
Max Kellermann 2018-08-21 11:06:05 +02:00
parent ede7434901
commit 185148f57c

View File

@ -66,7 +66,7 @@ SocketAddress::GetLocalRaw() const noexcept
const auto start = (const char *)sun;
const auto path = sun->sun_path;
const size_t header_size = path - start;
if (size < header_size)
if (size < size_type(header_size))
/* malformed address */
return nullptr;