[vlc-commits] inet_ntop always returns NULL on Windows.

Naohiro KORIYAMA git at videolan.org
Sat Dec 3 10:23:55 CET 2011


vlc | branch: master | Naohiro KORIYAMA <nkoriyama at gmail.com> | Sat Dec  3 11:45:36 2011 +0900| [6d0a1fce490cf2d4c9f23f6c0781efc91fa794b6] | committer: Rémi Denis-Courmont

inet_ntop always returns NULL on Windows.

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6d0a1fce490cf2d4c9f23f6c0781efc91fa794b6
---

 compat/inet_pton.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compat/inet_pton.c b/compat/inet_pton.c
index 7d7200b..8e0c4c1 100644
--- a/compat/inet_pton.c
+++ b/compat/inet_pton.c
@@ -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;



More information about the vlc-commits mailing list