* 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],
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] );
}
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;
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;