]> git.sur5r.net Git - openldap/commitdiff
Clean up unused bt_compare references
authorHoward Chu <hyc@openldap.org>
Tue, 11 Jan 2005 22:38:39 +0000 (22:38 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 11 Jan 2005 22:38:39 +0000 (22:38 +0000)
servers/slapd/back-bdb/dbcache.c
servers/slapd/back-bdb/init.c
servers/slapd/back-bdb/proto-bdb.h

index 02f6d31e221f10325e4c2e324672855a54028ae6..adcdf463a7790cfcfca3a30b57250406edc18244 100644 (file)
@@ -112,9 +112,6 @@ bdb_db_cache(
        rc = db->bdi_db->set_h_hash( db->bdi_db, bdb_db_hash );
 #endif
        rc = db->bdi_db->set_flags( db->bdi_db, DB_DUP | DB_DUPSORT );
-#if 0
-       rc = db->bdi_db->set_dup_compare( db->bdi_db, bdb_bt_compare );
-#endif
 
        file = ch_malloc( strlen( name ) + sizeof(BDB_SUFFIX) );
        sprintf( file, "%s" BDB_SUFFIX, name );
index 975ee8a56e045b5d655459e3876069ec577e9d6c..5e92a5544ab15a42494cab4c106767ede3086b1a 100644 (file)
@@ -101,33 +101,6 @@ bdb_db_init( BackendDB *be )
        return 0;
 }
 
-#if 0
-int
-bdb_bt_compare(
-       DB *db, 
-       const DBT *usrkey,
-       const DBT *curkey )
-{
-       unsigned char *u, *c;
-       int i, x;
-
-       u = usrkey->data;
-       c = curkey->data;
-
-#ifdef WORDS_BIGENDIAN
-       for( i = 0; i < (int)sizeof(ID); i++)
-#else
-       for( i = sizeof(ID)-1; i >= 0; i--)
-#endif
-       {
-               x = u[i] - c[i];
-               if( x ) return x;
-       }
-
-       return 0;
-}
-#endif
-
 static void *
 bdb_checkpoint( void *ctx, void *arg )
 {
@@ -323,10 +296,6 @@ bdb_db_open( BackendDB *be )
                }
 
                if( i == BDB_ID2ENTRY ) {
-#if 0
-                       rc = db->bdi_db->set_bt_compare( db->bdi_db,
-                               bdb_bt_compare );
-#endif
                        rc = db->bdi_db->set_pagesize( db->bdi_db,
                                BDB_ID2ENTRY_PAGESIZE );
                        if ( slapMode & SLAP_TOOL_READMAIN ) {
@@ -338,22 +307,12 @@ bdb_db_open( BackendDB *be )
                        rc = db->bdi_db->set_flags( db->bdi_db, 
                                DB_DUP | DB_DUPSORT );
 #ifndef BDB_HIER
-#if 0
-                       rc = db->bdi_db->set_dup_compare( db->bdi_db,
-                               bdb_bt_compare );
-#endif
                        if ( slapMode & SLAP_TOOL_READONLY ) {
                                flags |= DB_RDONLY;
                        } else {
                                flags |= DB_CREATE;
                        }
 #else
-#if 0
-                       rc = db->bdi_db->set_dup_compare( db->bdi_db,
-                               bdb_dup_compare );
-                       rc = db->bdi_db->set_bt_compare( db->bdi_db,
-                               bdb_bt_compare );
-#endif
                        if ( slapMode & (SLAP_TOOL_READONLY|SLAP_TOOL_READMAIN) ) {
                                flags |= DB_RDONLY;
                        } else {
index 073563f04b80f27d8165480be7502f03f0a327ed..3c5f967157ac7de44f5c2e8ece1da48da4d72c9d 100644 (file)
@@ -125,7 +125,6 @@ int bdb_dn2idl(
 
 #ifdef BDB_HIER
 #define bdb_dn2id_parent                       BDB_SYMBOL(dn2id_parent)
-#define bdb_dup_compare                                BDB_SYMBOL(dup_compare)
 #define bdb_fix_dn                                     BDB_SYMBOL(fix_dn)
 
 int bdb_dn2id_parent(
@@ -134,11 +133,6 @@ int bdb_dn2id_parent(
        EntryInfo *ei,
        ID *idp );
 
-int bdb_dup_compare(
-       DB *db,
-       const DBT *usrkey,
-       const DBT *curkey );
-
 int bdb_fix_dn( Entry *e, int checkit );
 #endif
 
@@ -300,15 +294,6 @@ ID bdb_idl_first( ID *ids, ID *cursor );
 ID bdb_idl_next( ID *ids, ID *cursor );
 
 
-#if 0
-#define bdb_bt_compare                         BDB_SYMBOL(bt_compare)
-
-int bdb_bt_compare(
-       DB *db,
-       const DBT *a,
-       const DBT *b );
-#endif
-
 
 /*
  * index.c