/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2007 The OpenLDAP Foundation.
+ * Copyright 1999-2009 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
* Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
BerVarray tmp;
if ( attr->a_vals != NULL ) {
- for ( ; !BER_BVISNULL( &attr->a_vals[ oldcount ] ); oldcount++ )
- /* just count */ ;
+ oldcount = attr->a_numvals;
}
tmp = ch_realloc( attr->a_vals, ( oldcount + count + 1 ) * sizeof( struct berval ) );
} else {
attr->a_nvals = attr->a_vals;
}
+ attr->a_numvals += count;
} else {
append = 1;
}
if ( ( bsi->bsi_flags & BSQL_SF_ALL_OPER )
- || an_find( bsi->bsi_attrs, &AllOper )
+ || an_find( bsi->bsi_attrs, slap_bv_all_operational_attrs )
|| an_find( bsi->bsi_attrs, &slap_schema.si_ad_structuralObjectClass->ad_cname ) )
{
ObjectClass *soc = NULL;