r12935@Kushana: nickm | 2007-05-10 11:25:09 -0400

Make buffer unit tests pass again


svn:r10158
This commit is contained in:
Nick Mathewson 2007-05-10 15:25:40 +00:00
parent de11011b1b
commit e3b2a7b53b

View File

@ -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; new_capacity = MIN_LAZY_SHRINK_SIZE;
if (buf->len == 0 && IS_FREELIST_SIZE(new_capacity)) { if (buf->len == 0 && IS_FREELIST_SIZE(new_capacity)) {