index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2011-01-29 11:47:31 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2011-02-04 09:55:45 +1000 |
commit | c9820ec97b417d33dc37eb589f069766f1068ea1 (patch) | |
tree | 4cd5aa5216ddc5d25e294ce841b42b4e84ac95f7 /lib/libalpm | |
parent | d843c86b7b7cbf376716817e7c2c55b1f9360a72 (diff) |
-rw-r--r-- | lib/libalpm/pkghash.c | 6 |
diff --git a/lib/libalpm/pkghash.c b/lib/libalpm/pkghash.c index 0324465f..8f7168d2 100644 --- a/lib/libalpm/pkghash.c +++ b/lib/libalpm/pkghash.c @@ -98,10 +98,12 @@ static pmpkghash_t *rehash(pmpkghash_t *oldhash) * require a table size increase that large. */ if(oldhash->buckets < 500) { newsize = oldhash->buckets * 2; - } else if(oldhash->buckets < 3500) { + } else if(oldhash->buckets < 2000) { newsize = oldhash->buckets * 3 / 2; - } else { + } else if(oldhash->buckets < 5000) { newsize = oldhash->buckets * 4 / 3; + } else { + newsize = oldhash->buckets + 1; } newhash = _alpm_pkghash_create(newsize); |