From: Pierangelo Masarati Date: Mon, 19 Jul 2004 21:43:03 +0000 (+0000) Subject: minor cleanup X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4c16e670949c300a9d7f30ef4d66ae310998316d;p=openldap minor cleanup --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 08f484a00d..133e216535 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -874,8 +874,7 @@ int slap_mods_opattrs( timestamp.bv_len = strlen(timebuf); if( op->o_dn.bv_len == 0 ) { - name.bv_val = SLAPD_ANONYMOUS; - name.bv_len = sizeof(SLAPD_ANONYMOUS)-1; + BER_BVSTR( &name, SLAPD_ANONYMOUS ); nname = name; } else { name = op->o_dn; diff --git a/servers/slapd/slapadd.c b/servers/slapd/slapadd.c index 8d6c54503d..4e17e7e936 100644 --- a/servers/slapd/slapadd.c +++ b/servers/slapd/slapadd.c @@ -237,11 +237,9 @@ slapadd( int argc, char **argv ) timestamp.bv_val = timebuf; timestamp.bv_len = strlen(timebuf); - if ( be->be_rootndn.bv_len == 0 ) { - name.bv_val = SLAPD_ANONYMOUS; - name.bv_len = sizeof(SLAPD_ANONYMOUS) - 1; - nname.bv_val = SLAPD_ANONYMOUS; - nname.bv_len = sizeof(SLAPD_ANONYMOUS) - 1; + if ( BER_BVISEMPTY( &be->be_rootndn ) ) { + BER_BVSTR( &name, SLAPD_ANONYMOUS ); + nname = name; } else { name = be->be_rootdn; nname = be->be_rootndn;