]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sql/compare.c
Cleanup ISO C compatibility for recent commits
[openldap] / servers / slapd / back-sql / compare.c
index 24fe2e9fb126ffcef5ec54bff196ba34d957e0ef..072f6049ece80c08bf305c3b24e599872ac89285 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2007 The OpenLDAP Foundation.
+ * Copyright 1999-2011 The OpenLDAP Foundation.
  * Portions Copyright 1999 Dmitry Kovalev.
  * Portions Copyright 2002 Pierangelo Masarati.
  * All rights reserved.
@@ -98,7 +98,7 @@ backsql_compare( Operation *op, SlapReply *rs )
        }
 
        if ( is_at_operational( op->oq_compare.rs_ava->aa_desc->ad_type ) ) {
-               SlapReply       nrs = { 0 };
+               SlapReply       nrs = { REP_SEARCH };
                Attribute       **ap;
 
                for ( ap = &e.e_attrs; *ap; ap = &(*ap)->a_next )
@@ -131,11 +131,10 @@ backsql_compare( Operation *op, SlapReply *rs )
                        a = attrs_find( a->a_next, op->oq_compare.rs_ava->aa_desc ) )
        {
                rs->sr_err = LDAP_COMPARE_FALSE;
-               if ( value_find_ex( op->oq_compare.rs_ava->aa_desc,
+               if ( attr_valfind( a,
                                        SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH |
                                        SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH,
-                                       a->a_nvals,
-                                       &op->oq_compare.rs_ava->aa_value,
+                                       &op->oq_compare.rs_ava->aa_value, NULL,
                                        op->o_tmpmemctx ) == 0 )
                {
                        rs->sr_err = LDAP_COMPARE_TRUE;