aboutsummaryrefslogtreecommitdiff
path: root/src/common/mempool.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-20 17:43:55 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-20 17:43:55 +0000
commit5364833be0f5c7fd3619ab140830194b1f7844a9 (patch)
tree3d6c2980943852c319bed6d3863e5844e00fcbbe /src/common/mempool.c
parentbc26f28865da1e95fa89a2d26314ae0fd1ef27e3 (diff)
downloadtor-5364833be0f5c7fd3619ab140830194b1f7844a9.tar
tor-5364833be0f5c7fd3619ab140830194b1f7844a9.tar.gz
r13017@Kushana: nickm | 2007-05-20 13:40:45 -0400
Address points in r10227. svn:r10229
Diffstat (limited to 'src/common/mempool.c')
-rw-r--r--src/common/mempool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/mempool.c b/src/common/mempool.c
index 173c6034d..2b1775c1b 100644
--- a/src/common/mempool.c
+++ b/src/common/mempool.c
@@ -385,11 +385,11 @@ mp_pool_clean(mp_pool_t *pool, int n)
{
mp_chunk_t *chunk, **first_to_free;
if (n < 0) {
+ /* As said in the documentation, "negative n" means "leave an additional
+ * -n chunks". So replace n with a positive number. */
n = pool->min_empty_chunks + (-n);
if (n < pool->n_empty_chunks)
pool->min_empty_chunks = n;
- /* XXX020 don't we want some sort of return here, given the
- * assert that follows? -RD */
}
ASSERT(n>=0);