]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/index.c
Import resetting of c_dn/c_cdn after anonymous bind.
[openldap] / servers / slapd / back-ldbm / index.c
index 5965ecf0eb45395cff58d875ddef6f7d97f23bdf..016be0644108895c329d9001321a243dd5240821 100644 (file)
@@ -99,9 +99,7 @@ index_read(
        char            *realval, *tmpval;
        char            buf[BUFSIZ];
 
-#ifdef HAVE_BERKELEY_DB2
-       memset( &key, 0, sizeof( key ) );
-#endif
+       ldbm_datum_init( key );
 
        prefix = index2prefix( indextype );
        Debug( LDAP_DEBUG_TRACE, "=> index_read( \"%s\" \"%c\" \"%s\" )\n",
@@ -173,9 +171,7 @@ add_value(
        char    *realval, *tmpval, *s;
        char    buf[BUFSIZ];
 
-#ifdef HAVE_BERKELEY_DB2
-       memset( &key, 0, sizeof( key ) );
-#endif
+       ldbm_datum_init( key );
 
        prefix = index2prefix( indextype );
        Debug( LDAP_DEBUG_TRACE, "=> add_value( \"%c%s\" )\n", prefix, val, 0 );