X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fgetentry.c;h=ccdca5ea402e074b3feec2515a125a9ae4beb243;hb=d2b05a3858822df66785b4a0939204b10ac1c47f;hp=272ea304add86cbc71b7fd04a4f64debb33836b9;hpb=669b8f4047c03d4583a44ed8287d0d5920d15373;p=openldap diff --git a/libraries/libldap/getentry.c b/libraries/libldap/getentry.c index 272ea304ad..ccdca5ea40 100644 --- a/libraries/libldap/getentry.c +++ b/libraries/libldap/getentry.c @@ -1,5 +1,6 @@ +/* $OpenLDAP$ */ /* - * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* Portions @@ -14,7 +15,6 @@ #include #include -#include #include #include #include @@ -27,6 +27,7 @@ ldap_first_entry( LDAP *ld, LDAPMessage *chain ) { assert( ld != NULL ); assert( LDAP_VALID( ld ) ); + assert( chain != NULL ); if( ld == NULL || chain == NULL ) { return NULL; @@ -42,6 +43,7 @@ ldap_next_entry( LDAP *ld, LDAPMessage *entry ) { assert( ld != NULL ); assert( LDAP_VALID( ld ) ); + assert( entry != NULL ); if ( ld == NULL || entry == NULL ) { return NULL; @@ -96,7 +98,7 @@ ldap_get_entry_controls( assert( sctrls != NULL ); if ( ld == NULL || sctrls == NULL || - entry == NULL || entry->lm_msgtype == LDAP_RES_SEARCH_ENTRY ) + entry == NULL || entry->lm_msgtype != LDAP_RES_SEARCH_ENTRY ) { return LDAP_PARAM_ERROR; }