ID cursora, ida, cursoro, ido, *subscop2;
Entry *matched, *a;
EntryInfo *ei;
- struct berval bv_alias = { sizeof("alias")-1, "alias" };
+ struct berval bv_alias = BER_BVC( "alias" );
AttributeAssertion aa_alias;
Filter af;
DB_LOCK locka, lockr;
null_attr.an_desc = NULL;
null_attr.an_oc = NULL;
null_attr.an_oc_exclude = 0;
- null_attr.an_name.bv_len = 0;
- null_attr.an_name.bv_val = NULL;
+ BER_BVZERO( &null_attr.an_name );
for( num_ctrls = 0; num_ctrls < SLAP_MAX_RESPONSE_CONTROLS; num_ctrls++ ) {
ctrls[num_ctrls] = NULL;
attrs[0].an_desc = NULL;
attrs[0].an_oc = NULL;
attrs[0].an_oc_exclude = 0;
- attrs[0].an_name.bv_len = 0;
- attrs[0].an_name.bv_val = NULL;
+ BER_BVZERO( &attrs[0].an_name );
}
manageDSAit = get_manageDSAit( sop );
ei_root.bei_parent = &ei_root;
e_root.e_private = &ei_root;
e_root.e_id = 0;
- e_root.e_nname.bv_val="";
- e_root.e_name.bv_val="";
+ BER_BVSTR( &e_root.e_nname, "" );
+ BER_BVSTR( &e_root.e_name, "" );
ei = &ei_root;
rs->sr_err = LDAP_SUCCESS;
} else {
{
if( !get_manageDSAit(op) && !get_domainScope(op) ) {
/* match referral objects */
- struct berval bv_ref = { sizeof("referral")-1, "referral" };
+ struct berval bv_ref = BER_BVC( "referral" );
rf.f_choice = LDAP_FILTER_EQUALITY;
rf.f_ava = &aa_ref;
rf.f_av_desc = slap_schema.si_ad_objectClass;
#ifdef BDB_SUBENTRIES
if( get_subentries_visibility( op ) ) {
- struct berval bv_subentry = { sizeof("SUBENTRY")-1, "SUBENTRY" };
+ struct berval bv_subentry = BER_BVC( "SUBENTRY" );
sf.f_choice = LDAP_FILTER_EQUALITY;
sf.f_ava = &aa_subentry;
sf.f_av_desc = slap_schema.si_ad_objectClass;
lastid ? *lastid : 0, rs->sr_nentries, NULL );
#endif
- ctrl.ldctl_value.bv_val = NULL;
+ BER_BVZERO( &ctrl.ldctl_value );
ctrls[0] = &ctrl;
ctrls[1] = NULL;
} else {
respcookie = ( PagedResultsCookie )0;
- cookie.bv_val = "";
- cookie.bv_len = 0;
+ BER_BVSTR( &cookie, "" );
}
op->o_conn->c_pagedresults_state.ps_cookie = respcookie;