From 38c5dd446ee8840cec2dfcad84379d81412975f5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 29 Nov 2000 17:15:00 +0000 Subject: [PATCH] * net.cc (cygwin_inet_aton): Return nonzero if the address is valid, zero if not according to Linux man page. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/net.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 8d2b7af42..ee62ec99e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 29 18:11:00 2000 Corinna Vinschen + + * net.cc (cygwin_inet_aton): Return nonzero if the address + is valid, zero if not according to Linux man page. + Mon Nov 27 21:09:50 2000 Kelley Cook * mmap.cc (munmap): Check that mmap and munmap length match. diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index cf5a98dec..1832eb1fc 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -130,10 +130,10 @@ cygwin_inet_aton (const char *cp, struct in_addr *inp) { unsigned long res = inet_addr (cp); if (res == INADDR_NONE && strcmp (cp, "255.255.255.255")) - return -1; + return 0; if (inp) inp->s_addr = res; - return 0; + return 1; } /* undocumented in wsock32.dll */