/* $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
static int cache_delete_entry_internal(Cache *cache, Entry *e);
#ifdef LDAP_DEBUG
+#ifdef SLAPD_UNUSED
static void lru_print(Cache *cache);
#endif
+#endif
static int
cache_entry_private_init( Entry*e )
void
cache_entry_commit( Entry *e )
{
- assert( e );
- assert( e->e_private );
+ assert( e != NULL );
+ assert( e->e_private != NULL );
assert( LEI(e)->lei_state == CACHE_ENTRY_CREATING );
/* assert( LEI(e)->lei_refcnt == 1 ); */
static int
cache_entry_private_destroy( Entry*e )
{
- assert( e->e_private );
+ assert( e->e_private != NULL );
free( e->e_private );
e->e_private = NULL;
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
- assert( e->e_private );
+ assert( e->e_private != NULL );
id = e->e_id;
refcnt = --LEI(e)->lei_refcnt;
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
- assert( e->e_private );
+ assert( e->e_private != NULL );
if ( avl_insert( &cache->c_dntree, (caddr_t) e,
entry_dn_cmp, avl_dup_error ) != 0 )
* we do not need to lock the entry if we only
* check the state, refcnt, LRU, and id.
*/
- assert( ep->e_private );
+ assert( ep->e_private != NULL );
/* save id */
id = ep->e_id;
count++;
- assert( ep->e_private );
+ assert( ep->e_private != NULL );
ep_id = ep->e_id;
state = LEI(ep)->lei_state;
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
- assert( e->e_private );
+ assert( e->e_private != NULL );
Debug( LDAP_DEBUG_TRACE, "====> cache_delete_entry( %ld )\n",
e->e_id, 0, 0 );
}
#ifdef LDAP_DEBUG
+#ifdef SLAPD_UNUSED
static void
lru_print( Cache *cache )
{
}
}
#endif
+#endif