]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/search.c
Remove dead code
[openldap] / libraries / libldap / search.c
index 4f028b0b1e4dc4901b6acdea267dfff590f79728..5adb5b8ed2d7aa976264eb91664b6c5df1d1f745 100644 (file)
@@ -91,11 +91,19 @@ ldap_search_ext(
        int sizelimit,
        int *msgidp )
 {
+       int rc;
        BerElement      *ber;
        int timelimit;
 
        Debug( LDAP_DEBUG_TRACE, "ldap_search_ext\n", 0, 0, 0 );
 
+       assert( ld != NULL );
+       assert( LDAP_VALID( ld ) );
+
+       /* check client controls */
+       rc = ldap_int_client_controls( ld, cctrls );
+       if( rc != LDAP_SUCCESS ) return rc;
+
        /*
         * if timeout is provided, both tv_sec and tv_usec must
         * be non-zero
@@ -207,6 +215,9 @@ ldap_search(
 
        Debug( LDAP_DEBUG_TRACE, "ldap_search\n", 0, 0, 0 );
 
+       assert( ld != NULL );
+       assert( LDAP_VALID( ld ) );
+
        ber = ldap_build_search_req( ld, base, scope, filter, attrs,
            attrsonly, NULL, NULL, -1, -1 );