* net.cc (cygwin_inet_aton): Return nonzero if the address

is valid, zero if not according to Linux man page.
This commit is contained in:
Corinna Vinschen 2000-11-29 17:15:00 +00:00
parent ab96569985
commit 38c5dd446e
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Thu Nov 29 18:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
* 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 <kelley.cook@home.com> Mon Nov 27 21:09:50 2000 Kelley Cook <kelley.cook@home.com>
* mmap.cc (munmap): Check that mmap and munmap length match. * mmap.cc (munmap): Check that mmap and munmap length match.

View File

@ -130,10 +130,10 @@ cygwin_inet_aton (const char *cp, struct in_addr *inp)
{ {
unsigned long res = inet_addr (cp); unsigned long res = inet_addr (cp);
if (res == INADDR_NONE && strcmp (cp, "255.255.255.255")) if (res == INADDR_NONE && strcmp (cp, "255.255.255.255"))
return -1; return 0;
if (inp) if (inp)
inp->s_addr = res; inp->s_addr = res;
return 0; return 1;
} }
/* undocumented in wsock32.dll */ /* undocumented in wsock32.dll */