- switch ( f->f_choice ) {
- case LDAP_FILTER_EQUALITY:
- filter_escape_value_x( &f->f_av_value, &tmp, op->o_tmpmemctx );
- /* NOTE: tmp can legitimately be NULL (meaning empty)
- * since in a Filter values in AVAs are supposed
- * to have been normalized, meaning that an empty value
- * is legal for that attribute's syntax */
-
- fstr->bv_len = f->f_av_desc->ad_cname.bv_len +
- tmp.bv_len + STRLENOF("(=)");
- fstr->bv_val = op->o_tmpalloc( fstr->bv_len + 1, op->o_tmpmemctx );
-
- snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s=%s)",
- f->f_av_desc->ad_cname.bv_val,
- tmp.bv_len ? tmp.bv_val : "" );
-
- ber_memfree_x( tmp.bv_val, op->o_tmpmemctx );
- break;