mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-27 01:02:53 -05:00
inet_addr cleanup
This commit is contained in:
parent
35f44be64b
commit
83b1ce9831
1 changed files with 8 additions and 5 deletions
|
|
@ -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 a new issue