]> git.sur5r.net Git - openldap/commitdiff
Slightly improvement over last commit (ITS#238 fix).
authorKurt Zeilenga <kurt@openldap.org>
Wed, 28 Jul 1999 23:21:53 +0000 (23:21 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 28 Jul 1999 23:21:53 +0000 (23:21 +0000)
servers/slapd/back-ldbm/index.c

index 5560f39e682ba63f6d1473f7dcfa9ccc34922286..3fb8a9afa644380119d7c7a96f4e4d5e7414dd91 100644 (file)
@@ -260,6 +260,13 @@ index_change_values(
        char            *at_cn; /* Attribute canonical name */
        int             mode;
 
+       if( vals == NULL ) {
+               Debug( LDAP_DEBUG_TRACE,
+              "=> index_change_values( \"%s\", NULL, %ld, op=%s )\n", 
+              type, id, ((op == __INDEX_ADD_OP) ? "ADD" : "DELETE" ) );
+               return 0;
+       }
+
        Debug( LDAP_DEBUG_TRACE,
               "=> index_change_values( \"%s\", %ld, op=%s )\n", 
               type, id, ((op == __INDEX_ADD_OP) ? "ADD" : "DELETE" ) );
@@ -302,8 +309,7 @@ index_change_values(
        }
 
 
-       if( vals != NULL ) {
-         for ( i = 0; vals[i] != NULL; i++ ) {
+       for ( i = 0; vals[i] != NULL; i++ ) {
                /*
                 * presence index entry
                 */
@@ -413,7 +419,6 @@ index_change_values(
                if ( bigbuf != NULL ) {
                        free( bigbuf );
                }
-         }
        }
        ldbm_cache_close( be, db );