X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=libraries%2Flibldap%2Fsort.c;h=84557eb33a8d248d0ddbbdf884da9494c14c3d1d;hb=8c30114d847ff034dd9e9382d88e276fa7f82833;hp=5734022c58170ece106a45094a117033a02a96b6;hpb=6ad1c45bd3a69a398b144b92fbcf9d6653f02607;p=openldap diff --git a/libraries/libldap/sort.c b/libraries/libldap/sort.c index 5734022c58..84557eb33a 100644 --- a/libraries/libldap/sort.c +++ b/libraries/libldap/sort.c @@ -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 ) {