]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/cr.c
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_5
[openldap] / servers / slapd / cr.c
index 5e40ce202b86a25109274e63ca3469e6aecbbb4c..1809f3df60062939a1eaa9d1ad039b7bdb749bf3 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2014 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@ struct cindexrec {
 };
 
 static Avlnode *cr_index = NULL;
-static LDAP_STAILQ_HEAD(CRList, slap_content_rule) cr_list
+static LDAP_STAILQ_HEAD(CRList, ContentRule) cr_list
        = LDAP_STAILQ_HEAD_INITIALIZER(cr_list);
 
 static int
@@ -120,6 +120,8 @@ cr_insert(
        struct cindexrec        *cir;
        char                    **names;
 
+       assert( scr != NULL );
+
        if ( scr->scr_oid ) {
                cir = (struct cindexrec *)
                        ch_calloc( 1, sizeof(struct cindexrec) );
@@ -127,9 +129,6 @@ cr_insert(
                cir->cir_name.bv_len = strlen( scr->scr_oid );
                cir->cir_cr = scr;
 
-               assert( cir->cir_name.bv_val != NULL );
-               assert( cir->cir_cr != NULL );
-
                if ( avl_insert( &cr_index, (caddr_t) cir,
                                 cr_index_cmp, avl_dup_error ) )
                {
@@ -150,9 +149,6 @@ cr_insert(
                        cir->cir_name.bv_len = strlen( *names );
                        cir->cir_cr = scr;
 
-                       assert( cir->cir_name.bv_val != NULL );
-                       assert( cir->cir_cr != NULL );
-
                        if ( avl_insert( &cr_index, (caddr_t) cir,
                                         cr_index_cmp, avl_dup_error ) )
                        {