From 0c1f1f959fbf02e1cad37ec2dfa17cf9ed7e52ae Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 4 Oct 2004 20:55:09 +0000 Subject: [PATCH] minor cleanup --- servers/slapd/back-bdb/cache.c | 5 +++-- servers/slapd/back-bdb/search.c | 3 +-- servers/slapd/ctxcsn.c | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index 5f928279c3..141fe32829 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -553,7 +553,8 @@ bdb_cache_find_info( struct bdb_info *bdb, ID id ) { - EntryInfo ei, *ei2; + EntryInfo ei = { 0 }, + *ei2; ei.bei_id = id; @@ -583,7 +584,7 @@ bdb_cache_find_id( struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private; Entry *ep = NULL; int rc = 0; - EntryInfo ei; + EntryInfo ei = { 0 }; ei.bei_id = id; diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 907ac3e8cf..7c109ce390 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -1005,8 +1005,7 @@ id2entry_retry: #endif case LDAP_SCOPE_SUBTREE: { EntryInfo *tmp; - for (tmp = BEI(e); tmp; - tmp = tmp->bei_parent ) { + for ( tmp = BEI(e); tmp; tmp = tmp->bei_parent ) { if ( tmp->bei_id == base.e_id ) { scopeok = 1; break; diff --git a/servers/slapd/ctxcsn.c b/servers/slapd/ctxcsn.c index 3080ea312a..3b4bad51af 100644 --- a/servers/slapd/ctxcsn.c +++ b/servers/slapd/ctxcsn.c @@ -103,7 +103,7 @@ static struct berval ocbva[] = { BER_BVC("top"), BER_BVC("subentry"), BER_BVC("syncProviderSubentry"), - {0,NULL} + BER_BVNULL }; Entry * @@ -130,8 +130,7 @@ slap_create_context_csn_entry( context_csn, NULL ); } - bv.bv_val = "{}"; - bv.bv_len = sizeof("{}")-1; + BER_BVSTR( &bv, "{}" ); attr_merge_one( e, slap_schema.si_ad_subtreeSpecification, &bv, NULL ); build_new_dn( &e->e_name, &be->be_nsuffix[0], -- 2.39.5