From: Pierangelo Masarati Date: Fri, 6 Aug 2004 16:40:15 +0000 (+0000) Subject: cleanup X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bfb646553327ea973306aa7b2885a56ade18f1d5;p=openldap cleanup --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index d0a2976190..475826cc87 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -1407,7 +1407,7 @@ dn_match_cleanup:; * rights are determined by OR'ing the individual * rights given by the acis. */ - for ( i = 0; at->a_vals[i].bv_val != NULL; i++ ) { + for ( i = 0; !BER_BVISNULL( &at->a_nvals[i] ); i++ ) { if (aci_mask( op, e, desc, val, &at->a_nvals[i], @@ -1856,7 +1856,8 @@ aci_match_set ( set = bvals[0]; BER_BVZERO( &bvals[0] ); - for ( i = 1; !BER_BVISNULL( &bvals[i] ); i++ ); + for ( i = 1; !BER_BVISNULL( &bvals[i] ); i++ ) + /* count */ ; bvals[0].bv_val = bvals[i-1].bv_val; BER_BVZERO( &bvals[i-1] ); } diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 0ed59d3316..1e856c8921 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -570,8 +570,7 @@ slap_mods2entry( for ( i = 0; mods->sml_values[i].bv_val; i++ ) { ber_dupbv( &attr->a_vals[i], &mods->sml_values[i] ); } - attr->a_vals[i].bv_len = 0; - attr->a_vals[i].bv_val = NULL; + BER_BVZERO( &attr->a_vals[i] ); } else { attr->a_vals = mods->sml_values; mods->sml_values = NULL; @@ -585,8 +584,7 @@ slap_mods2entry( for ( i = 0; mods->sml_nvalues[i].bv_val; i++ ) { ber_dupbv( &attr->a_nvals[i], &mods->sml_nvalues[i] ); } - attr->a_nvals[i].bv_len = 0; - attr->a_nvals[i].bv_val = NULL; + BER_BVZERO( &attr->a_nvals[i] ); } else { attr->a_nvals = mods->sml_nvalues; mods->sml_nvalues = NULL;