]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/cr.c
Don't bother setting up threads if there are no indexed attrs
[openldap] / servers / slapd / cr.c
index a1c6005e93f2fef14d25a0f4b24d5e411f2d9302..366246e1231b2c7d0787e455a1fc5c9e75d95ece 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -127,8 +127,8 @@ cr_insert(
                cir->cir_name.bv_len = strlen( scr->scr_oid );
                cir->cir_cr = scr;
 
-               assert( cir->cir_name.bv_val );
-               assert( cir->cir_cr );
+               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,8 +150,8 @@ cr_insert(
                        cir->cir_name.bv_len = strlen( *names );
                        cir->cir_cr = scr;
 
-                       assert( cir->cir_name.bv_val );
-                       assert( cir->cir_cr );
+                       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 ) )
@@ -412,7 +412,7 @@ cr_unparse( BerVarray *res, ContentRule *start, ContentRule *end, int sys )
        ContentRule *cr;
        int i, num;
        struct berval bv, *bva = NULL, idx;
-       char ibuf[32], *ptr;
+       char ibuf[32];
 
        if ( !start )
                start = LDAP_STAILQ_FIRST( &cr_list );