inet_ntop always returns NULL on Windows.
authorNaohiro KORIYAMA <nkoriyama@gmail.com>
Sat, 3 Dec 2011 02:45:36 +0000 (11:45 +0900)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 3 Dec 2011 09:23:52 +0000 (11:23 +0200)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
compat/inet_pton.c

index 7d7200b..8e0c4c1 100644 (file)
@@ -55,7 +55,7 @@ const char *inet_ntop (int af, const void *src, char *dst, int len)
     {
         case AF_INET:
             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;
                 return NULL;