Commit 44725e73 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

use BER_BVNULL

parent bd7cd426
......@@ -1207,7 +1207,7 @@ dn_match_cleanup:;
if ( b->a_group_pat.bv_len ) {
struct berval bv;
struct berval ndn = { 0, NULL };
struct berval ndn = BER_BVNULL;
int rc;
if ( op->o_ndn.bv_len == 0 ) {
......@@ -1763,14 +1763,14 @@ aci_match_set (
int setref
)
{
struct berval set = { 0, NULL };
struct berval set = BER_BVNULL;
int rc = 0;
AciSetCookie cookie;
if (setref == 0) {
ber_dupbv_x( &set, subj, op->o_tmpmemctx );
} else {
struct berval subjdn, ndn = { 0, NULL };
struct berval subjdn, ndn = BER_BVNULL;
struct berval setat;
BerVarray bvals;
const char *text;
......
......@@ -1875,7 +1875,7 @@ print_acl( Backend *be, AccessControl *a )
}
if ( a->acl_filter != NULL ) {
struct berval bv = { 0, NULL };
struct berval bv = BER_BVNULL;
to++;
filter2bv( a->acl_filter, &bv );
fprintf( stderr, " filter=%s\n", bv.bv_val );
......
......@@ -46,7 +46,7 @@ do_add( Operation *op, SlapReply *rs )
{
BerElement *ber = op->o_ber;
char *last;
struct berval dn = { 0, NULL };
struct berval dn = BER_BVNULL;
ber_len_t len;
ber_tag_t tag;
Entry *e;
......
......@@ -39,7 +39,7 @@ bdb_csn_commit(
)
{
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
struct berval ctxcsn_ndn = { 0, NULL };
struct berval ctxcsn_ndn = BER_BVNULL;
EntryInfo *ctxcsn_ei = NULL;
DB_LOCK ctxcsn_lock;
struct berval max_committed_csn;
......
......@@ -36,7 +36,7 @@ static const struct bdbi_database {
{ NULL, NULL, 0, 0 }
};
struct berval bdb_uuid = { 0, NULL };
struct berval bdb_uuid = BER_BVNULL;
typedef void * db_malloc(size_t);
typedef void * db_realloc(void *, size_t);
......
......@@ -376,7 +376,7 @@ bdb_do_search( Operation *op, SlapReply *rs, Operation *sop,
Entry *e = NULL, base;
Entry *matched = NULL;
EntryInfo *ei;
struct berval realbase = { 0, NULL };
struct berval realbase = BER_BVNULL;
int manageDSAit;
int tentries = 0;
ID lastid = NOID;
......@@ -558,7 +558,7 @@ dn2entry_retry:
}
if ( e == NULL ) {
struct berval matched_dn = { 0, NULL };
struct berval matched_dn = BER_BVNULL;
if ( matched != NULL ) {
BerVarray erefs;
......@@ -1674,7 +1674,7 @@ send_pagerequest_response(
LDAPControl ctrl, *ctrls[2];
BerElementBuffer berbuf;
BerElement *ber = (BerElement *)&berbuf;
struct berval cookie = { 0, NULL };
struct berval cookie = BER_BVNULL;
PagedResultsCookie respcookie;
#ifdef NEW_LOGGING
......
......@@ -41,7 +41,7 @@ dnssrv_back_search(
char *hostlist = NULL;
char **hosts = NULL;
char *refdn;
struct berval nrefdn = { 0, NULL };
struct berval nrefdn = BER_BVNULL;
BerVarray urls = NULL;
int manageDSAit;
......
......@@ -42,7 +42,7 @@ ldap_back_add(
Attribute *a;
LDAPMod **attrs;
struct berval mapped;
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
ber_int_t msgid;
dncookie dc;
int isupdate;
......
......@@ -45,7 +45,7 @@ ldap_back_bind(
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
int rc = 0;
ber_int_t msgid;
dncookie dc;
......
......@@ -38,8 +38,8 @@ ldap_back_compare(
{
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
struct berval mapped_at = { 0, NULL }, mapped_val = { 0, NULL };
struct berval mdn = { 0, NULL };
struct berval mapped_at = BER_BVNULL, mapped_val = BER_BVNULL;
struct berval mdn = BER_BVNULL;
ber_int_t msgid;
int freeval = 0;
dncookie dc;
......
......@@ -45,7 +45,7 @@ ldap_back_delete(
int rc = LDAP_SUCCESS;
#endif /* LDAP_BACK_PROXY_AUTHZ */
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
lc = ldap_back_getconn( op, rs );
......
......@@ -96,7 +96,7 @@ ldap_back_exop_passwd(
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
req_pwdexop_s *qpw = &op->oq_pwdexop;
struct berval mdn = { 0, NULL }, newpw;
struct berval mdn = BER_BVNULL, newpw;
LDAPMessage *res;
ber_int_t msgid;
int rc, isproxy;
......
......@@ -43,7 +43,7 @@ ldap_back_modify(
Modifications *ml;
int i, j, rc;
struct berval mapped;
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
ber_int_t msgid;
dncookie dc;
int isupdate;
......
......@@ -45,7 +45,7 @@ ldap_back_modrdn(
int rc = LDAP_SUCCESS;
#endif /* LDAP_BACK_PROXY_AUTHZ */
struct berval mdn = { 0, NULL }, mnewSuperior = { 0, NULL };
struct berval mdn = BER_BVNULL, mnewSuperior = BER_BVNULL;
lc = ldap_back_getconn( op, rs );
if ( !lc || !ldap_back_dobind(lc, op, rs) ) {
......
......@@ -42,7 +42,7 @@ ldap_build_entry( Operation *op, LDAPMessage *e, Entry *ent,
#define LDAP_BUILD_ENTRY_PRIVATE 0x01
#define LDAP_BUILD_ENTRY_NORMALIZE 0x02
static struct berval dummy = { 0, NULL };
static struct berval dummy = BER_BVNULL;
int
ldap_back_search(
......@@ -54,10 +54,10 @@ ldap_back_search(
struct timeval tv;
LDAPMessage *res, *e;
int rc = 0, msgid;
struct berval match = { 0, NULL };
struct berval match = BER_BVNULL;
char **mapped_attrs = NULL;
struct berval mbase;
struct berval mfilter = { 0, NULL };
struct berval mfilter = BER_BVNULL;
int dontfreetext = 0;
dncookie dc;
#ifdef LDAP_BACK_PROXY_AUTHZ
......@@ -532,7 +532,7 @@ ldap_back_entry_get(
struct ldapinfo *li = (struct ldapinfo *) op->o_bd->be_private;
struct ldapconn *lc;
int rc = 1, is_oc;
struct berval mapped = { 0, NULL }, bdn, mdn;
struct berval mapped = BER_BVNULL, bdn, mdn;
LDAPMessage *result = NULL, *e = NULL;
char *gattr[3];
char *filter = NULL;
......
......@@ -42,8 +42,8 @@ ldbm_back_modrdn(
AttributeDescription *entry = slap_schema.si_ad_entry;
struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
struct berval p_dn, p_ndn;
struct berval new_dn = { 0, NULL}, new_ndn = { 0, NULL };
struct berval old_ndn = { 0, NULL };
struct berval new_dn = BER_BVNULL, new_ndn = BER_BVNULL;
struct berval old_ndn = BER_BVNULL;
Entry *e, *p = NULL;
Entry *matched;
/* LDAP v2 supporting correct attribute handling. */
......
......@@ -46,7 +46,7 @@ ldbm_back_search(
ID id, cursor;
Entry *e;
Entry *matched = NULL;
struct berval realbase = { 0, NULL };
struct berval realbase = BER_BVNULL;
int manageDSAit = get_manageDSAit( op );
#ifdef NEW_LOGGING
......@@ -86,7 +86,7 @@ ldbm_back_search(
}
if ( e == NULL ) {
struct berval matched_dn = { 0, NULL };
struct berval matched_dn = BER_BVNULL;
if ( matched != NULL ) {
BerVarray erefs;
......
......@@ -40,7 +40,7 @@ meta_back_add( Operation *op, SlapReply *rs )
int i, candidate = -1;
Attribute *a;
LDAPMod **attrs;
struct berval mdn = { 0, NULL }, mapped;
struct berval mdn = BER_BVNULL, mapped;
dncookie dc;
#ifdef NEW_LOGGING
......
......@@ -191,7 +191,7 @@ meta_back_do_single_bind(
)
{
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
ber_int_t msgid;
dncookie dc;
struct metasingleconn *lsc = &lc->conns[ candidate ];
......
......@@ -38,7 +38,7 @@ meta_back_compare( Operation *op, SlapReply *rs )
struct metaconn *lc;
struct metasingleconn *lsc;
char *match = NULL, *err = NULL;
struct berval mmatch = { 0, NULL };
struct berval mmatch = BER_BVNULL;
int candidates = 0, last = 0, i, count = 0, rc;
int cres = LDAP_SUCCESS, rres = LDAP_SUCCESS;
int *msgid;
......@@ -70,7 +70,7 @@ meta_back_compare( Operation *op, SlapReply *rs )
dc.ctx = "compareDN";
for ( i = 0, lsc = lc->conns; !META_LAST(lsc); ++i, ++lsc ) {
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
struct berval mapped_attr = op->oq_compare.rs_ava->aa_desc->ad_cname;
struct berval mapped_value = op->oq_compare.rs_ava->aa_value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment