diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-06-24 02:10:21 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-06-24 02:10:21 +0000 |
commit | b4b8da5d230030db5d32e55fb8cecadea67f8cbc (patch) | |
tree | 5a42362fae0a8acdad88c6e247109c3d547f8c95 /src | |
parent | 06e09cdd47eaa8f7e90ce2c3df9b4b2042b195f3 (diff) | |
download | tor-b4b8da5d230030db5d32e55fb8cecadea67f8cbc.tar.gz tor-b4b8da5d230030db5d32e55fb8cecadea67f8cbc.zip |
Turn a while into a do/while; save a redundant test
svn:r6683
Diffstat (limited to 'src')
-rw-r--r-- | src/or/buffers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index db740fbce2..86741e9733 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1299,7 +1299,7 @@ write_to_buf_zlib(buf_t *buf, tor_zlib_state_t *state, char *next; size_t old_avail, avail; int over = 0; - while (!over) { + do { buf_ensure_capacity(buf, buf->datalen + 1024); next = _buf_end(buf); if (next < buf->cur) @@ -1339,7 +1339,7 @@ write_to_buf_zlib(buf_t *buf, tor_zlib_state_t *state, if (buf->datalen > buf->highwater) buf->highwater = buf->datalen; buf_total_used += old_avail - avail; - } + } while (!over); return 0; } |