]> git.sur5r.net Git - openldap/commitdiff
minor cleanup
authorPierangelo Masarati <ando@openldap.org>
Mon, 4 Oct 2004 20:55:09 +0000 (20:55 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 4 Oct 2004 20:55:09 +0000 (20:55 +0000)
servers/slapd/back-bdb/cache.c
servers/slapd/back-bdb/search.c
servers/slapd/ctxcsn.c

index 5f928279c3a11e9b52f81edb6acf52589c15c23f..141fe32829563a0291e92ff740ce33672a4af2b2 100644 (file)
@@ -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;
 
index 907ac3e8cfc437787941e4cf170aac9c1c95b8aa..7c109ce390bacb49b80aac3f9aa5e77a985c92c2 100644 (file)
@@ -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;
index 3080ea312a46ce40e309f59998c3086b8a474bad..3b4bad51af2d7c466d56bde62a9f19259e179cc9 100644 (file)
@@ -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],