]> git.sur5r.net Git - openldap/commitdiff
Clean up entry initialization
authorHoward Chu <hyc@openldap.org>
Sat, 13 Dec 2003 02:00:07 +0000 (02:00 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 13 Dec 2003 02:00:07 +0000 (02:00 +0000)
servers/slapd/back-ldap/search.c
servers/slapd/back-meta/search.c

index c82eca89d895eae19582e864307e2bab9375e708..62e4cc47c8da8d058b7ea6171434603047eede6f 100644 (file)
@@ -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
index d8e807a53e425b5d152889aeea33e41202c044fe..3bfcf86e23b14ffedf841bbf6d076a4c09dbcb0e 100644 (file)
@@ -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";