]> git.sur5r.net Git - openldap/commitdiff
remove pointer v. int lint from ber_sockbuf_ctrl.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 8 Jun 2000 01:08:01 +0000 (01:08 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 8 Jun 2000 01:08:01 +0000 (01:08 +0000)
libraries/liblber/sockbuf.c
servers/slapd/connection.c

index be8c3e8150dcc7140b21afdf78cfe2a4d2e415a6..c648ebb96744346974b9b0b121212ffe0867940f 100644 (file)
@@ -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.
index 0d2d62bc4f0efd4c799418c54245745281f32e04..f2029bb844b542ddb6827ae620705da26a76f56f 100644 (file)
@@ -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 );