mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
inet_addr cleanup
This commit is contained in:
parent
35f44be64b
commit
83b1ce9831
@ -349,11 +349,14 @@ 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 ) {
|
||||
in->s_addr = u;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
#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;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user