summaryrefslogtreecommitdiff
path: root/src/or/buffers.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-10 15:25:40 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-10 15:25:40 +0000
commite3b2a7b53b1a92568f41dca426be451866e90c16 (patch)
tree14a62b3f39934b8221bb01b8478ac7f263e413cf /src/or/buffers.c
parentde11011b1b7d2ef2297e8fdb404d28780b84c6c3 (diff)
downloadtor-e3b2a7b53b1a92568f41dca426be451866e90c16.tar.gz
tor-e3b2a7b53b1a92568f41dca426be451866e90c16.zip
r12935@Kushana: nickm | 2007-05-10 11:25:09 -0400
Make buffer unit tests pass again svn:r10158
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r--src/or/buffers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 6c88c3923f..8e674eea0f 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -323,7 +323,7 @@ buf_resize(buf_t *buf, size_t new_capacity)
}
}
- if (new_capacity < MIN_LAZY_SHRINK_SIZE)
+ if (buf->len == 0 && new_capacity < MIN_LAZY_SHRINK_SIZE)
new_capacity = MIN_LAZY_SHRINK_SIZE;
if (buf->len == 0 && IS_FREELIST_SIZE(new_capacity)) {