From: Kurt Zeilenga Date: Thu, 8 Jun 2000 01:08:01 +0000 (+0000) Subject: remove pointer v. int lint from ber_sockbuf_ctrl. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2708 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=61be4bd0c85c753850e65e0be0a6c3af5b011a8f;p=openldap remove pointer v. int lint from ber_sockbuf_ctrl. --- diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index be8c3e8150..c648ebb967 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -92,8 +92,8 @@ ber_sockbuf_ctrl( Sockbuf *sb, int opt, void *arg ) ret = 1; break; case LBER_SB_OPT_SET_NONBLOCK: - ret = ( ber_pvt_socket_set_nonblock( sb->sb_fd, - (int)arg ) ? -1 : 1 ); + ret = ber_pvt_socket_set_nonblock( sb->sb_fd, arg != NULL) + ? -1 : 1; break; case LBER_SB_OPT_DRAIN: /* Drain the data source to enable possible errors (e.g. diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 0d2d62bc4f..f2029bb844 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -435,7 +435,7 @@ long connection_init( #ifdef LDAP_DEBUG ber_sockbuf_add_io( c->c_sb, &ber_sockbuf_io_debug, INT_MAX, NULL ); #endif - if( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_NONBLOCK, (void *)1 ) < 0 ) { + if( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_NONBLOCK, ~ NULL ) < 0 ) { Debug( LDAP_DEBUG_ANY, "connection_init(%d, %s): set nonblocking failed\n", s, c->c_peer_name,0 );