aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-01-05 06:03:10 +0000
committerRoger Dingledine <arma@torproject.org>2007-01-05 06:03:10 +0000
commit658c09c06fdcf32764c9e30aa1e824e6750edca2 (patch)
treedab24e6f955d4ae95ef73412f80ec95c457d6db5 /src/common/tortls.c
parent466650aa14459bf6a2553f6c500f41c164b46712 (diff)
downloadtor-658c09c06fdcf32764c9e30aa1e824e6750edca2.tar
tor-658c09c06fdcf32764c9e30aa1e824e6750edca2.tar.gz
more progress and cleanups
svn:r9269
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index b183ca1df..c20fec648 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -875,6 +875,8 @@ tor_tls_get_n_raw_bytes(tor_tls_t *tls, size_t *n_read, size_t *n_written)
* we wrapped around by more than ULONG_MAX since the last time we called
* this function.
*/
+ tor_assert(r >= tls->last_read_count);
+ tor_assert(w >= tls->last_write_count);
*n_read = (size_t)(r - tls->last_read_count);
*n_written = (size_t)(w - tls->last_write_count);
tls->last_read_count = r;