Commit 163c7e53 authored by Naohiro KORIYAMA's avatar Naohiro KORIYAMA Committed by Rémi Denis-Courmont

inet_ntop always returns NULL on Windows.

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
(cherry picked from commit 6d0a1fce490cf2d4c9f23f6c0781efc91fa794b6)
parent c76783a0
...@@ -55,7 +55,7 @@ const char *inet_ntop (int af, const void *src, char *dst, int len) ...@@ -55,7 +55,7 @@ const char *inet_ntop (int af, const void *src, char *dst, int len)
{ {
case AF_INET: case AF_INET:
if (snprintf (dst, len, "%hhu.%hhu.%hhu.%hhu", if (snprintf (dst, len, "%hhu.%hhu.%hhu.%hhu",
b[0], b[1], b[2], b[3]) <= len) b[0], b[1], b[2], b[3]) >= len)
{ {
errno = ENOSPC; errno = ENOSPC;
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment