digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
- /* we should have at least one value at this point */
- assert( values != NULL && values[0] != NULL );
-
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
+ /* we should have at least one value at this point */
+ assert( i > 0 );
+
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
return LDAP_SUCCESS;
}
-
int
approxFilter(
slap_mask_t use,
char *s;
for( i=0; values[i] != NULL; i++ ) {
- /* just count them */
+ /* empty - just count them */
}
+
+ /* we should have at least one value at this point */
assert( i > 0 );
keys = (struct berval **)ch_malloc( sizeof( struct berval * ) * (i+1) );
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
- /* we should have at least one value at this point */
- assert( values != NULL && values[0] != NULL );
-
for( i=0; values[i] != NULL; i++ ) {
- /* just count them */
+ /* empty - just count them */
}
+ /* we should have at least one value at this point */
+ assert( i > 0 );
+
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
- /* we should have at least one value at this point */
- assert( values != NULL && values[0] != NULL );
-
nkeys=0;
- /* create normalized copy of values */
for( i=0; values[i] != NULL; i++ ) {
- /* empty */
+ /* empty - just count them */
}
+
+ /* we should have at least one value at this point */
+ assert( i > 0 );
+
nvalues = ch_malloc( sizeof( struct berval * ) * (i+1) );
for( i=0; values[i] != NULL; i++ ) {
nvalues[i] = ber_bvstr( UTF8normalize( values[i]->bv_val,
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
- /* we should have at least one value at this point */
- assert( values != NULL && values[0] != NULL );
-
for( i=0; values[i] != NULL; i++ ) {
- /* just count them */
+ /* empty - just count them */
}
+ /* we should have at least one value at this point */
+ assert( i > 0 );
+
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
- /* we should have at least one value at this point */
- assert( values != NULL && values[0] != NULL );
-
nkeys=0;
- /* create normalized copy of values */
for( i=0; values[i] != NULL; i++ ) {
- /* empty */
+ /* empty - just count them */
}
+
+ /* we should have at least one value at this point */
+ assert( i > 0 );
+
nvalues = ch_malloc( sizeof( struct berval * ) * (i+1) );
for( i=0; values[i] != NULL; i++ ) {
nvalues[i] = ber_bvstr( UTF8normalize( values[i]->bv_val,
digest.bv_val = HASHdigest;
digest.bv_len = sizeof(HASHdigest);
- /* we should have at least one value at this point */
- assert( values != NULL && values[0] != NULL );
-
for( i=0; values[i] != NULL; i++ ) {
- /* just count them */
+ /* empty - just count them */
}
+ /* we should have at least one value at this point */
+ assert( i > 0 );
+
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );