From: Howard Chu Date: Tue, 11 Jan 2005 22:38:39 +0000 (+0000) Subject: Clean up unused bt_compare references X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~424 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0bc4b77527a5d543baad22e5bcd091ff8ba5bdfa;p=openldap Clean up unused bt_compare references --- diff --git a/servers/slapd/back-bdb/dbcache.c b/servers/slapd/back-bdb/dbcache.c index 02f6d31e22..adcdf463a7 100644 --- a/servers/slapd/back-bdb/dbcache.c +++ b/servers/slapd/back-bdb/dbcache.c @@ -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 ); diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 975ee8a56e..5e92a5544a 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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 { diff --git a/servers/slapd/back-bdb/proto-bdb.h b/servers/slapd/back-bdb/proto-bdb.h index 073563f04b..3c5f967157 100644 --- a/servers/slapd/back-bdb/proto-bdb.h +++ b/servers/slapd/back-bdb/proto-bdb.h @@ -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