mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Cleanup unused variables
This commit is contained in:
parent
caeae75662
commit
df3d8f3e30
@ -42,12 +42,6 @@ bdb_add(Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
int num_retries = 0;
|
int num_retries = 0;
|
||||||
|
|
||||||
Operation* ps_list;
|
|
||||||
int rc;
|
|
||||||
EntryInfo *suffix_ei = NULL;
|
|
||||||
Entry *ctxcsn_e;
|
|
||||||
int ctxcsn_added = 0;
|
|
||||||
|
|
||||||
LDAPControl **postread_ctrl = NULL;
|
LDAPControl **postread_ctrl = NULL;
|
||||||
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
||||||
int num_ctrls = 0;
|
int num_ctrls = 0;
|
||||||
@ -404,10 +398,6 @@ retry: /* transaction retry */
|
|||||||
|
|
||||||
bdb_cache_add( bdb, ei, e, &nrdn, locker );
|
bdb_cache_add( bdb, ei, e, &nrdn, locker );
|
||||||
|
|
||||||
if ( suffix_ei == NULL ) {
|
|
||||||
suffix_ei = BEI(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
|
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
|
||||||
rs->sr_text = "txn_commit failed";
|
rs->sr_text = "txn_commit failed";
|
||||||
} else {
|
} else {
|
||||||
|
@ -81,7 +81,7 @@ bdb_attr_mask_cr(
|
|||||||
*indexmask = a->ai_indexmask;
|
*indexmask = a->ai_indexmask;
|
||||||
*cr = a->ai_cr;
|
*cr = a->ai_cr;
|
||||||
} else {
|
} else {
|
||||||
*indexmask = NULL;
|
*indexmask = 0;
|
||||||
*cr = NULL;
|
*cr = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,8 +373,6 @@ hdb_cache_find_parent(
|
|||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
|
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
|
||||||
EntryInfo ei, eip, *ei2 = NULL, *ein = NULL, *eir = NULL;
|
EntryInfo ei, eip, *ei2 = NULL, *ein = NULL, *eir = NULL;
|
||||||
char ndn[SLAP_LDAPDN_MAXLEN];
|
|
||||||
ID parent;
|
|
||||||
int rc;
|
int rc;
|
||||||
int addlru = 1;
|
int addlru = 1;
|
||||||
|
|
||||||
@ -1236,7 +1234,7 @@ bdb_txn_free( void *key, void *data )
|
|||||||
static int
|
static int
|
||||||
bdb_txn_get( Operation *op, DB_ENV *env, DB_TXN **txn, int reset )
|
bdb_txn_get( Operation *op, DB_ENV *env, DB_TXN **txn, int reset )
|
||||||
{
|
{
|
||||||
int i, rc, lockid;
|
int i, rc;
|
||||||
void *ctx, *data = NULL;
|
void *ctx, *data = NULL;
|
||||||
|
|
||||||
/* If no op was provided, try to find the ctx anyway... */
|
/* If no op was provided, try to find the ctx anyway... */
|
||||||
|
@ -42,11 +42,7 @@ bdb_delete( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
int num_retries = 0;
|
int num_retries = 0;
|
||||||
|
|
||||||
Operation* ps_list;
|
|
||||||
int rc;
|
int rc;
|
||||||
EntryInfo *suffix_ei;
|
|
||||||
Entry *ctxcsn_e;
|
|
||||||
int ctxcsn_added = 0;
|
|
||||||
|
|
||||||
LDAPControl **preread_ctrl = NULL;
|
LDAPControl **preread_ctrl = NULL;
|
||||||
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
||||||
|
@ -224,7 +224,6 @@ comp_list_candidates(
|
|||||||
ID *tmp,
|
ID *tmp,
|
||||||
ID *save )
|
ID *save )
|
||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
|
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
ComponentFilter *f;
|
ComponentFilter *f;
|
||||||
|
|
||||||
@ -485,7 +484,6 @@ list_candidates(
|
|||||||
ID *tmp,
|
ID *tmp,
|
||||||
ID *save )
|
ID *save )
|
||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
|
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
Filter *f;
|
Filter *f;
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ int bdb_id2entry(
|
|||||||
DB *db = bdb->bi_id2entry->bdi_db;
|
DB *db = bdb->bi_id2entry->bdi_db;
|
||||||
DBT key, data;
|
DBT key, data;
|
||||||
struct berval bv;
|
struct berval bv;
|
||||||
int rc = 0, ret = 0;
|
int rc = 0;
|
||||||
ID nid;
|
ID nid;
|
||||||
|
|
||||||
*e = NULL;
|
*e = NULL;
|
||||||
|
@ -611,7 +611,7 @@ bdb_idl_insert_key(
|
|||||||
int rc;
|
int rc;
|
||||||
DBT data;
|
DBT data;
|
||||||
DBC *cursor;
|
DBC *cursor;
|
||||||
ID lo, hi, tmp, nlo, nhi, nid;
|
ID lo, hi, nlo, nhi, nid;
|
||||||
char *err;
|
char *err;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,6 @@ static int indexer(
|
|||||||
slap_mask_t mask )
|
slap_mask_t mask )
|
||||||
{
|
{
|
||||||
int rc, i;
|
int rc, i;
|
||||||
const char *text;
|
|
||||||
DB *db;
|
DB *db;
|
||||||
struct berval *keys;
|
struct berval *keys;
|
||||||
|
|
||||||
@ -269,10 +268,6 @@ static int index_at_values(
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
slap_mask_t mask = 0;
|
slap_mask_t mask = 0;
|
||||||
#ifdef LDAP_COMP_MATCH
|
|
||||||
ComponentReference* cr_list, *cr;
|
|
||||||
AttributeDescription *comp_ad;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( type->sat_sup ) {
|
if( type->sat_sup ) {
|
||||||
/* recurse */
|
/* recurse */
|
||||||
@ -287,6 +282,8 @@ static int index_at_values(
|
|||||||
if( type->sat_ad ) {
|
if( type->sat_ad ) {
|
||||||
#ifdef LDAP_COMP_MATCH
|
#ifdef LDAP_COMP_MATCH
|
||||||
/* component indexing */
|
/* component indexing */
|
||||||
|
ComponentReference* cr_list, *cr;
|
||||||
|
|
||||||
bdb_attr_mask_cr( op->o_bd->be_private, type->sat_ad, &mask, &cr_list );
|
bdb_attr_mask_cr( op->o_bd->be_private, type->sat_ad, &mask, &cr_list );
|
||||||
if ( cr_list ) {
|
if ( cr_list ) {
|
||||||
for( cr = cr_list ; cr ; cr = cr->cr_next ) {
|
for( cr = cr_list ; cr ; cr = cr->cr_next ) {
|
||||||
|
@ -416,9 +416,6 @@ bdb_db_destroy( BackendDB *be )
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
||||||
Operation *ps = NULL;
|
|
||||||
Operation *psn = NULL;
|
|
||||||
void *saved_tmpmemctx = NULL;
|
|
||||||
|
|
||||||
/* close db environment */
|
/* close db environment */
|
||||||
if( bdb->bi_dbenv ) {
|
if( bdb->bi_dbenv ) {
|
||||||
|
@ -282,12 +282,7 @@ bdb_modify( Operation *op, SlapReply *rs )
|
|||||||
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
||||||
int num_ctrls = 0;
|
int num_ctrls = 0;
|
||||||
|
|
||||||
Operation* ps_list;
|
|
||||||
struct psid_entry *pm_list, *pm_prev;
|
|
||||||
int rc;
|
int rc;
|
||||||
EntryInfo *suffix_ei;
|
|
||||||
Entry *ctxcsn_e;
|
|
||||||
int ctxcsn_added = 0;
|
|
||||||
|
|
||||||
Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(bdb_modify) ": %s\n",
|
Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(bdb_modify) ": %s\n",
|
||||||
op->o_req_dn.bv_val, 0, 0 );
|
op->o_req_dn.bv_val, 0, 0 );
|
||||||
|
@ -42,8 +42,6 @@ bdb_modrdn( Operation *op, SlapReply *rs )
|
|||||||
struct bdb_op_info opinfo = {0};
|
struct bdb_op_info opinfo = {0};
|
||||||
Entry dummy = {0};
|
Entry dummy = {0};
|
||||||
|
|
||||||
ID id;
|
|
||||||
|
|
||||||
Entry *np = NULL; /* newSuperior Entry */
|
Entry *np = NULL; /* newSuperior Entry */
|
||||||
struct berval *np_dn = NULL; /* newSuperior dn */
|
struct berval *np_dn = NULL; /* newSuperior dn */
|
||||||
struct berval *np_ndn = NULL; /* newSuperior ndn */
|
struct berval *np_ndn = NULL; /* newSuperior ndn */
|
||||||
@ -64,12 +62,7 @@ bdb_modrdn( Operation *op, SlapReply *rs )
|
|||||||
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
|
||||||
int num_ctrls = 0;
|
int num_ctrls = 0;
|
||||||
|
|
||||||
Operation *ps_list;
|
|
||||||
struct psid_entry *pm_list, *pm_prev;
|
|
||||||
int rc;
|
int rc;
|
||||||
EntryInfo *suffix_ei;
|
|
||||||
Entry *ctxcsn_e;
|
|
||||||
int ctxcsn_added = 0;
|
|
||||||
|
|
||||||
int parent_is_glue = 0;
|
int parent_is_glue = 0;
|
||||||
int parent_is_leaf = 0;
|
int parent_is_leaf = 0;
|
||||||
|
@ -35,7 +35,7 @@ int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *out )
|
|||||||
int bdb_last_id( BackendDB *be, DB_TXN *tid )
|
int bdb_last_id( BackendDB *be, DB_TXN *tid )
|
||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
||||||
int i, rc;
|
int rc;
|
||||||
ID id = 0;
|
ID id = 0;
|
||||||
unsigned char idbuf[sizeof(ID)];
|
unsigned char idbuf[sizeof(ID)];
|
||||||
DBT key, data;
|
DBT key, data;
|
||||||
|
@ -43,9 +43,6 @@ static void send_paged_response(
|
|||||||
ID *lastid,
|
ID *lastid,
|
||||||
int tentries );
|
int tentries );
|
||||||
|
|
||||||
static int bdb_pfid_cmp( const void *v_id1, const void *v_id2 );
|
|
||||||
static ID* bdb_id_dup( Operation *op, ID *id );
|
|
||||||
|
|
||||||
/* Dereference aliases for a single alias entry. Return the final
|
/* Dereference aliases for a single alias entry. Return the final
|
||||||
* dereferenced entry on success, NULL on any failure.
|
* dereferenced entry on success, NULL on any failure.
|
||||||
*/
|
*/
|
||||||
@ -637,13 +634,10 @@ dn2entry_retry:
|
|||||||
goto loop_begin;
|
goto loop_begin;
|
||||||
}
|
}
|
||||||
|
|
||||||
loop_start:
|
|
||||||
|
|
||||||
for ( id = bdb_idl_first( candidates, &cursor );
|
for ( id = bdb_idl_first( candidates, &cursor );
|
||||||
id != NOID ; id = bdb_idl_next( candidates, &cursor ) )
|
id != NOID ; id = bdb_idl_next( candidates, &cursor ) )
|
||||||
{
|
{
|
||||||
int scopeok = 0;
|
int scopeok = 0;
|
||||||
ID* idhole = NULL;
|
|
||||||
|
|
||||||
loop_begin:
|
loop_begin:
|
||||||
|
|
||||||
@ -1276,18 +1270,3 @@ done:
|
|||||||
(void) ber_free_buf( ber );
|
(void) ber_free_buf( ber );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
bdb_pfid_cmp( const void *v_id1, const void *v_id2 )
|
|
||||||
{
|
|
||||||
const ID *p1 = v_id1, *p2 = v_id2;
|
|
||||||
return *p1 - *p2;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ID*
|
|
||||||
bdb_id_dup( Operation *op, ID *id )
|
|
||||||
{
|
|
||||||
ID *new;
|
|
||||||
new = ch_malloc( sizeof(ID) );
|
|
||||||
*new = *id;
|
|
||||||
return new;
|
|
||||||
}
|
|
||||||
|
@ -212,7 +212,6 @@ static int bdb_tool_next_id(
|
|||||||
struct berval *text,
|
struct berval *text,
|
||||||
int hole )
|
int hole )
|
||||||
{
|
{
|
||||||
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
|
|
||||||
struct berval dn = e->e_name;
|
struct berval dn = e->e_name;
|
||||||
struct berval ndn = e->e_nname;
|
struct berval ndn = e->e_nname;
|
||||||
struct berval pdn, npdn;
|
struct berval pdn, npdn;
|
||||||
|
Loading…
Reference in New Issue
Block a user