diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-05-20 17:43:55 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-05-20 17:43:55 +0000 |
commit | 5364833be0f5c7fd3619ab140830194b1f7844a9 (patch) | |
tree | 3d6c2980943852c319bed6d3863e5844e00fcbbe /src/common/mempool.c | |
parent | bc26f28865da1e95fa89a2d26314ae0fd1ef27e3 (diff) | |
download | tor-5364833be0f5c7fd3619ab140830194b1f7844a9.tar.gz tor-5364833be0f5c7fd3619ab140830194b1f7844a9.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/mempool.c b/src/common/mempool.c index 173c6034da..2b1775c1ba 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); |