Silence warning. Also avoids pointless umask(0) when umask already is 0.

This commit is contained in:
Hallvard Furuseth 2009-07-06 23:19:52 +00:00
parent e6173ac9c2
commit 461a2135fb

View file

@ -1478,7 +1478,7 @@ slap_open_listener(
* create/unlink the socket; likely need exec perms to access
* the socket (ITS#4709) */
{
mode_t old_umask;
mode_t old_umask = 0;
if ( (*sal)->sa_family == AF_LOCAL ) {
old_umask = umask( 0 );
@ -1486,7 +1486,7 @@ slap_open_listener(
#endif /* LDAP_PF_LOCAL */
rc = bind( s, *sal, addrlen );
#ifdef LDAP_PF_LOCAL
if ( (*sal)->sa_family == AF_LOCAL ) {
if ( old_umask != 0 ) {
umask( old_umask );
}
}