mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 18:49:34 -05:00
Minor cleanup (coverity)
This commit is contained in:
parent
c25208cd14
commit
bc3dbcbde9
9 changed files with 14 additions and 18 deletions
|
|
@ -841,6 +841,11 @@ int bdb_tool_entry_reindex(
|
|||
return -1;
|
||||
}
|
||||
|
||||
op.o_hdr = &ohdr;
|
||||
op.o_bd = be;
|
||||
op.o_tmpmemctx = NULL;
|
||||
op.o_tmpmfuncs = &ch_mfuncs;
|
||||
|
||||
if (! (slapMode & SLAP_TOOL_QUICK)) {
|
||||
rc = TXN_BEGIN( bi->bi_dbenv, NULL, &tid, bi->bi_db_opflags );
|
||||
if( rc != 0 ) {
|
||||
|
|
@ -865,11 +870,6 @@ int bdb_tool_entry_reindex(
|
|||
"=> " LDAP_XSTRING(bdb_tool_entry_reindex) "( %ld, \"%s\" )\n",
|
||||
(long) id, e->e_dn, 0 );
|
||||
|
||||
op.o_hdr = &ohdr;
|
||||
op.o_bd = be;
|
||||
op.o_tmpmemctx = NULL;
|
||||
op.o_tmpmfuncs = &ch_mfuncs;
|
||||
|
||||
rc = bdb_tool_index_add( &op, tid, e );
|
||||
|
||||
done:
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ dnssrv_back_search(
|
|||
send_ldap_result( op, rs );
|
||||
}
|
||||
|
||||
if ( refdn ) free( refdn );
|
||||
free( refdn );
|
||||
if ( nrefdn.bv_val ) free( nrefdn.bv_val );
|
||||
|
||||
done:
|
||||
|
|
|
|||
|
|
@ -1845,7 +1845,7 @@ retry:;
|
|||
* LDAP_COMPARE_{TRUE|FALSE}) */
|
||||
default:
|
||||
/* only touch when activity actually took place... */
|
||||
if ( li->li_idle_timeout && lc ) {
|
||||
if ( li->li_idle_timeout ) {
|
||||
lc->lc_time = op->o_time;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -423,7 +423,8 @@ distproc_ldadd( CfEntryInfo *p, Entry *e, ConfigArgs *ca )
|
|||
Debug( LDAP_DEBUG_ANY, "slapd-distproc: "
|
||||
"unable to init %sunderlying database \"%s\".\n",
|
||||
lc->lc_common_li == NULL ? "common " : "", e->e_name.bv_val, 0 );
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
rc = LDAP_CONSTRAINT_VIOLATION;
|
||||
goto done;
|
||||
}
|
||||
|
||||
li = ca->be->be_private;
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ retry:
|
|||
|
||||
} else {
|
||||
/* only touch when activity actually took place... */
|
||||
if ( li->li_idle_timeout && lc ) {
|
||||
if ( li->li_idle_timeout ) {
|
||||
lc->lc_time = op->o_time;
|
||||
}
|
||||
|
||||
|
|
@ -332,7 +332,7 @@ retry:
|
|||
|
||||
} else {
|
||||
/* only touch when activity actually took place... */
|
||||
if ( li->li_idle_timeout && lc ) {
|
||||
if ( li->li_idle_timeout ) {
|
||||
lc->lc_time = op->o_time;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ retry:
|
|||
|
||||
} else {
|
||||
/* only touch when activity actually took place... */
|
||||
if ( li->li_idle_timeout && lc ) {
|
||||
if ( li->li_idle_timeout ) {
|
||||
lc->lc_time = op->o_time;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -827,7 +827,6 @@ ldif_readdir(
|
|||
if ( rs != NULL )
|
||||
rs->sr_text =
|
||||
save_errno != ENOENT ? "internal error (bad directory)"
|
||||
: !is_rootDSE ? "internal error (missing directory)"
|
||||
: "internal error (database directory does not exist)";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ mdb_modrdn( Operation *op, SlapReply *rs )
|
|||
rs->sr_err = LDAP_OTHER;
|
||||
goto return_results;
|
||||
}
|
||||
new_parent_dn = &np->e_name;
|
||||
np_dn = &np->e_name;
|
||||
|
||||
} else {
|
||||
np_dn = NULL;
|
||||
|
|
|
|||
|
|
@ -383,10 +383,6 @@ mdb_tool_entry_get_int( BackendDB *be, ID id, Entry **ep )
|
|||
rc = mdb_id2name( &op, mdb_tool_txn, &idcursor, id, &dn, &ndn );
|
||||
if ( rc ) {
|
||||
rc = LDAP_OTHER;
|
||||
if ( e ) {
|
||||
mdb_entry_return( &op, e );
|
||||
e = NULL;
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
if ( tool_base != NULL ) {
|
||||
|
|
@ -610,7 +606,7 @@ mdb_tool_index_add(
|
|||
static int
|
||||
mdb_tool_index_finish()
|
||||
{
|
||||
int i, rc;
|
||||
int i, rc = 0;
|
||||
ldap_pvt_thread_mutex_lock( &mdb_tool_index_mutex );
|
||||
for ( i=1; i<mdb_tool_threads; i++ ) {
|
||||
if ( mdb_tool_index_rec[i].ir_i == LDAP_BUSY ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue