From: Howard Chu Date: Sat, 13 Dec 2003 02:00:07 +0000 (+0000) Subject: Clean up entry initialization X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~210 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b011c51390d2005355a07093bc265bf35ca65e5c;p=openldap Clean up entry initialization --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index c82eca89d8..62e4cc47c8 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -216,7 +216,7 @@ fail:; ldap_pvt_thread_yield(); } else if (rc == LDAP_RES_SEARCH_ENTRY) { - Entry ent; + Entry ent = {0}; struct berval bdn; e = ldap_first_entry(lc->ld,res); if ( ldap_build_entry(op, e, &ent, &bdn, @@ -413,10 +413,6 @@ ldap_build_entry( return LDAP_INVALID_DN_SYNTAX; } - ent->e_id = 0; - ent->e_attrs = 0; - ent->e_ocflags = 0; - ent->e_private = 0; attrp = &ent->e_attrs; #ifdef ENABLE_REWRITE diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index d8e807a53e..3bfcf86e23 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -570,7 +570,7 @@ meta_send_entry( { struct metainfo *li = ( struct metainfo * )op->o_bd->be_private; struct berval a, mapped; - Entry ent; + Entry ent = {0}; BerElement ber = *e->lm_ber; Attribute *attr, **attrp; struct berval dummy = { 0, NULL }; @@ -616,9 +616,6 @@ meta_send_entry( &ent.e_nname, target ); } - ent.e_id = 0; - ent.e_attrs = 0; - ent.e_private = 0; attrp = &ent.e_attrs; dc.ctx = "searchAttrDN";