]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/getentry.c
Update for new password codes for MSVC5
[openldap] / libraries / libldap / getentry.c
index 8724758b8439c8d8e8aeb0b3f9eb33f67f6468d4..09721f1d8e991fcc90b570db2c8e03db53f89270 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
@@ -27,9 +28,10 @@ ldap_first_entry( LDAP *ld, LDAPMessage *chain )
 {
        assert( ld != NULL );
        assert( LDAP_VALID( ld ) );
+       assert( chain != NULL );
 
-       if( ld == NULL || chain == NULLMSG ) {
-               return NULLMSG;
+       if( ld == NULL || chain == NULL ) {
+               return NULL;
        }
 
        return chain->lm_msgtype == LDAP_RES_SEARCH_ENTRY
@@ -42,14 +44,15 @@ ldap_next_entry( LDAP *ld, LDAPMessage *entry )
 {
        assert( ld != NULL );
        assert( LDAP_VALID( ld ) );
+       assert( entry != NULL );
 
-       if ( ld == NULL || entry == NULLMSG ) {
-               return NULLMSG;
+       if ( ld == NULL || entry == NULL ) {
+               return NULL;
        }
 
        for (
                entry = entry->lm_chain;
-               entry != NULLMSG;
+               entry != NULL;
                entry = entry->lm_chain )
        {
                if( entry->lm_msgtype == LDAP_RES_SEARCH_ENTRY ) {
@@ -57,7 +60,7 @@ ldap_next_entry( LDAP *ld, LDAPMessage *entry )
                }
        }
 
-       return( NULLMSG );
+       return( NULL );
 }
 
 int