]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/error.c
Sync with 2.x
[openldap] / libraries / libldap / error.c
index 8594c849afe69e5644254432f95d0c57703a4e80..61ae88f4b6797db61a6d1d82c7aa78ceee796777 100644 (file)
@@ -211,7 +211,6 @@ ldap_parse_result(
        LDAPMessage     *lm;
        ber_int_t errcode = LDAP_SUCCESS;
 
-       int rc;
        ber_tag_t tag;
        BerElement      *ber;
 
@@ -232,7 +231,7 @@ ldap_parse_result(
        if(serverctrls != NULL) *serverctrls = NULL;
 
        /* Find the next result... */
-       for ( lm = r; lm->lm_chain != NULL; lm = lm->lm_chain ) {
+       for ( lm = r; lm != NULL; lm = lm->lm_chain ) {
                /* skip over entries and references */
                if( lm->lm_msgtype != LDAP_RES_SEARCH_ENTRY &&
                        lm->lm_msgtype != LDAP_RES_SEARCH_REFERENCE &&
@@ -307,7 +306,7 @@ ldap_parse_result(
                }
 
                if( tag != LBER_ERROR ) {
-                       rc = ldap_int_get_controls( ber, serverctrls );
+                       int rc = ldap_int_get_controls( ber, serverctrls );
 
                        if( rc != LDAP_SUCCESS ) {
                                tag = LBER_ERROR;