summaryrefslogtreecommitdiff
path: root/modules/ldap/util_ldap_cache_mgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ldap/util_ldap_cache_mgr.c')
-rw-r--r--modules/ldap/util_ldap_cache_mgr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/ldap/util_ldap_cache_mgr.c b/modules/ldap/util_ldap_cache_mgr.c
index ae7e652a..2389b5d0 100644
--- a/modules/ldap/util_ldap_cache_mgr.c
+++ b/modules/ldap/util_ldap_cache_mgr.c
@@ -359,9 +359,11 @@ util_ald_cache_t *util_ald_create_cache(util_ldap_state_t *st,
cache->maxentries = cache_size;
cache->numentries = 0;
cache->size = cache_size / 3;
- if (cache->size < 64) cache->size = 64;
- for (i = 0; primes[i] && primes[i] < cache->size; ++i) ;
- cache->size = primes[i]? primes[i] : primes[i-1];
+ if (cache->size < 64)
+ cache->size = 64;
+ for (i = 0; primes[i] && primes[i] < cache->size; ++i)
+ ;
+ cache->size = primes[i] ? primes[i] : primes[i-1];
cache->nodes = (util_cache_node_t **)util_ald_alloc(cache, cache->size * sizeof(util_cache_node_t *));
if (!cache->nodes) {