]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/sort.c
Added thread-pool getkey/setkey functions
[openldap] / libraries / libldap / sort.c
index 5734022c58170ece106a45094a117033a02a96b6..84557eb33a8d248d0ddbbdf884da9494c14c3d1d 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /* Portions
@@ -90,13 +90,11 @@ ldap_sort_entries(
        LDAPMessage             *e, *last;
        LDAPMessage             **ep;
 
-       count = ldap_count_entries( ld, *chain );
+       assert( ld != NULL );
 
+       count = ldap_count_entries( ld, *chain );
 
        if ( count < 0 ) {
-               if( ld != NULL ) {
-                       ld->ld_errno = LDAP_PARAM_ERROR;
-               }
                return -1;
 
        } else if ( count < 2 ) {