]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/attr.c
Removed unnecessary definition that is already in core.schema.
[openldap] / servers / slapd / back-ldbm / attr.c
index 7818fb1ff671eb5e8069b1da43d582ff9efefa42..a5ece146fbea8640925cc54426965fdd66a82415 100644 (file)
@@ -67,9 +67,9 @@ attr_masks(
        *indexmask = 0;
        *syntaxmask = 0;
        if ( (a = (struct attrinfo *) avl_find( li->li_attrs, type,
-           ainfo_type_cmp )) == NULL ) {
+           (AVL_CMP) ainfo_type_cmp )) == NULL ) {
                if ( (a = (struct attrinfo *) avl_find( li->li_attrs, "default",
-                   ainfo_type_cmp )) == NULL ) {
+                   (AVL_CMP) ainfo_type_cmp )) == NULL ) {
                        return;
                }
        }
@@ -142,7 +142,9 @@ attr_index_config(
                        a->ai_indexmask |= INDEX_FROMINIT;
                }
 
-               switch (avl_insert( &li->li_attrs, (caddr_t) a, ainfo_cmp, ainfo_dup )) {
+               switch (avl_insert( &li->li_attrs, (caddr_t) a,
+                       (AVL_CMP) ainfo_cmp, (AVL_DUP) ainfo_dup ))
+               {
                case 1:         /* duplicate - updating init version */
                        free( a->ai_type );
                        free( (char *) a );
@@ -164,3 +166,22 @@ attr_index_config(
        if ( argc > 1 )
                charray_free( indexes );
 }
+
+
+#ifdef SLAP_CLEANUP
+
+static void
+ainfo_free( void *attr )
+{
+       struct attrinfo *ai = attr;
+       free( ai->ai_type );
+       free( ai );
+}
+
+void
+attr_index_destroy( Avlnode *tree )
+{
+       avl_free( tree, ainfo_free );
+}
+
+#endif /* SLAP_CLEANUP */