diff options
author | Roger Dingledine <arma@torproject.org> | 2004-10-16 22:14:52 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-10-16 22:14:52 +0000 |
commit | de65052312ff9ddd86e492985008bd5ca61d7aa9 (patch) | |
tree | 96a2b81c47b4e35e465aa01d8328517a1525d752 /src/or/buffers.c | |
parent | 25a046df7422560b16dfdb302df9621309d5fa77 (diff) | |
download | tor-de65052312ff9ddd86e492985008bd5ca61d7aa9.tar.gz tor-de65052312ff9ddd86e492985008bd5ca61d7aa9.zip |
don't assert multiple things in the same tor_assert()
svn:r2544
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 26c1e568ab..350d922f74 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -167,7 +167,8 @@ int read_to_buf(int s, size_t at_most, buf_t *buf, int *reached_eof) { int read_result; assert_buf_ok(buf); - tor_assert(reached_eof && (s>=0)); + tor_assert(reached_eof); + tor_assert(s>=0); if (buf_ensure_capacity(buf,buf->datalen+at_most)) return -1; @@ -242,7 +243,9 @@ int flush_buf(int s, buf_t *buf, size_t *buf_flushlen) int write_result; assert_buf_ok(buf); - tor_assert(buf_flushlen && (s>=0) && (*buf_flushlen <= buf->datalen)); + tor_assert(buf_flushlen); + tor_assert(s>=0); + tor_assert(*buf_flushlen <= buf->datalen); if(*buf_flushlen == 0) /* nothing to flush */ return 0; @@ -270,7 +273,8 @@ int flush_buf_tls(tor_tls *tls, buf_t *buf, size_t *buf_flushlen) { int r; assert_buf_ok(buf); - tor_assert(tls && buf_flushlen); + tor_assert(tls); + tor_assert(buf_flushlen); /* we want to let tls write even if flushlen is zero, because it might * have a partial record pending */ |