inet_addr cleanup

This commit is contained in:
Kurt Zeilenga 2004-12-31 12:02:23 +00:00
parent 35f44be64b
commit 83b1ce9831

View File

@ -349,12 +349,15 @@ int
ldap_pvt_inet_aton( const char *host, struct in_addr *in)
{
unsigned long u = inet_addr( host );
if ( u != 0xffffffff || u != (unsigned long) -1 ) {
#ifdef INADDR_NONE
if ( u == INADDR_NONE ) return 0;
#endif
if ( u == 0xffffffffUL || u == (unsigned long) -1L ) return 0;
in->s_addr = u;
return 1;
}
return 0;
}
#endif