minor cleanup

This commit is contained in:
Pierangelo Masarati 2001-11-17 14:39:10 +00:00
parent 0f30fb0d8f
commit 6df4889f43
9 changed files with 9 additions and 16 deletions

View file

@ -183,10 +183,10 @@ attr_index_config(
#ifdef NEW_LOGGING #ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1, LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
"attr_index_config: index %s 0x%04x\n", "attr_index_config: index %s 0x%04lx\n",
ad->ad_cname.bv_val, mask )); ad->ad_cname.bv_val, mask ));
#else #else
Debug( LDAP_DEBUG_CONFIG, "index %s 0x%04x\n", Debug( LDAP_DEBUG_CONFIG, "index %s 0x%04lx\n",
ad->ad_cname.bv_val, mask, 0 ); ad->ad_cname.bv_val, mask, 0 );
#endif #endif

View file

@ -13,6 +13,7 @@
#include <ac/socket.h> #include <ac/socket.h>
#include <ac/string.h> #include <ac/string.h>
#include <ac/time.h> #include <ac/time.h>
#include <ac/unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include "slap.h" #include "slap.h"

View file

@ -26,7 +26,6 @@ dn2id_add(
int rc, flags; int rc, flags;
DBCache *db; DBCache *db;
Datum key, data; Datum key, data;
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
#ifdef NEW_LOGGING #ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY, LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,

View file

@ -39,7 +39,6 @@ ldbm_back_group(
Attribute *attr; Attribute *attr;
struct berval bv; struct berval bv;
AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass;
const char *group_oc_name = NULL; const char *group_oc_name = NULL;
const char *group_at_name = group_at->ad_cname.bv_val; const char *group_at_name = group_at->ad_cname.bv_val;

View file

@ -22,7 +22,6 @@
int int
id2entry_add( Backend *be, Entry *e ) id2entry_add( Backend *be, Entry *e )
{ {
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
DBCache *db; DBCache *db;
Datum key, data; Datum key, data;
int len, rc, flags; int len, rc, flags;

View file

@ -279,7 +279,6 @@ idl_store(
{ {
int rc, flags; int rc, flags;
Datum data; Datum data;
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
#ifdef LDBM_DEBUG_IDL #ifdef LDBM_DEBUG_IDL
idl_check(idl); idl_check(idl);
@ -292,14 +291,14 @@ idl_store(
data.dptr = (char *) idl; data.dptr = (char *) idl;
data.dsize = (ID_BLOCK_IDS_OFFSET + ID_BLOCK_NMAXN(idl)) * sizeof(ID); data.dsize = (ID_BLOCK_IDS_OFFSET + ID_BLOCK_NMAXN(idl)) * sizeof(ID);
flags = LDBM_REPLACE;
rc = ldbm_cache_store( db, key, data, flags );
#ifdef LDBM_DEBUG #ifdef LDBM_DEBUG
Statslog( LDAP_DEBUG_STATS, "<= idl_store(): rc=%d\n", Statslog( LDAP_DEBUG_STATS, "<= idl_store(): rc=%d\n",
rc, 0, 0, 0, 0 ); rc, 0, 0, 0, 0 );
#endif #endif
flags = LDBM_REPLACE;
rc = ldbm_cache_store( db, key, data, flags );
/* Debug( LDAP_DEBUG_TRACE, "<= idl_store %d\n", rc, 0, 0 ); */ /* Debug( LDAP_DEBUG_TRACE, "<= idl_store %d\n", rc, 0, 0 ); */
return( rc ); return( rc );
} }
@ -458,7 +457,7 @@ idl_insert_key(
ID id ID id
) )
{ {
int i, j, first, rc; int i, j, first, rc = 0;
ID_BLOCK *idl, *tmp, *tmp2, *tmp3; ID_BLOCK *idl, *tmp, *tmp2, *tmp3;
Datum k2; Datum k2;

View file

@ -235,7 +235,6 @@ static int index_at_values(
{ {
slap_mask_t mask = 0; slap_mask_t mask = 0;
slap_mask_t tmpmask = 0; slap_mask_t tmpmask = 0;
int lindex = 0;
if( type->sat_sup ) { if( type->sat_sup ) {
/* recurse */ /* recurse */

View file

@ -103,9 +103,6 @@ ldbm_back_open(
{ {
int rc; int rc;
struct ldbm_backend_info *lbi
= (struct ldbm_backend_info *) bi->bi_private;
/* initialize the underlying database system */ /* initialize the underlying database system */
rc = ldbm_initialize( NULL ); rc = ldbm_initialize( NULL );
return rc; return rc;

View file

@ -131,7 +131,6 @@ ldbm_back_exop_passwd(
Modifications ml; Modifications ml;
struct berval *vals[2]; struct berval *vals[2];
char textbuf[SLAP_TEXT_BUFLEN]; /* non-returnable */ char textbuf[SLAP_TEXT_BUFLEN]; /* non-returnable */
size_t textlen;
vals[0] = hash; vals[0] = hash;
vals[1] = NULL; vals[1] = NULL;
@ -142,7 +141,8 @@ ldbm_back_exop_passwd(
ml.sml_next = NULL; ml.sml_next = NULL;
rc = ldbm_modify_internal( be, rc = ldbm_modify_internal( be,
conn, op, op->o_ndn, &ml, e, text, textbuf, textlen ); conn, op, op->o_ndn, &ml, e, text, textbuf,
sizeof( textbuf ) );
/* FIXME: ldbm_modify_internal may set *tex = textbuf, /* FIXME: ldbm_modify_internal may set *tex = textbuf,
* which is BAD */ * which is BAD */