diff options
author | Roger Dingledine <arma@torproject.org> | 2004-10-16 22:28:11 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-10-16 22:28:11 +0000 |
commit | 6d873e57431bf3566bb698ec966bcb5630cadf81 (patch) | |
tree | 86c74d2fde5cbd7d594a7d37e89add05fcc03c5b /src/common/tortls.c | |
parent | de65052312ff9ddd86e492985008bd5ca61d7aa9 (diff) | |
download | tor-6d873e57431bf3566bb698ec966bcb5630cadf81.tar.gz tor-6d873e57431bf3566bb698ec966bcb5630cadf81.zip |
don't assert multiple things in the same tor_assert()
svn:r2545
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r-- | src/common/tortls.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index 306d9f55ec..63924c26f6 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -191,7 +191,10 @@ tor_tls_create_certificate(crypto_pk_env_t *rsa, start_time = time(NULL); - tor_assert(rsa && cname && rsa_sign && cname_sign); + tor_assert(rsa); + tor_assert(cname); + tor_assert(rsa_sign); + tor_assert(cname_sign); if (!(sign_pkey = _crypto_pk_env_get_evp_pkey(rsa_sign,1))) goto error; if (!(pkey = _crypto_pk_env_get_evp_pkey(rsa,0))) @@ -432,7 +435,8 @@ int tor_tls_read(tor_tls *tls, char *cp, size_t len) { int r, err; - tor_assert(tls && tls->ssl); + tor_assert(tls); + tor_assert(tls->ssl); tor_assert(tls->state == TOR_TLS_ST_OPEN); r = SSL_read(tls->ssl, cp, len); if (r > 0) @@ -457,7 +461,8 @@ int tor_tls_write(tor_tls *tls, char *cp, size_t n) { int r, err; - tor_assert(tls && tls->ssl); + tor_assert(tls); + tor_assert(tls->ssl); tor_assert(tls->state == TOR_TLS_ST_OPEN); if (n == 0) return 0; @@ -489,7 +494,8 @@ int tor_tls_handshake(tor_tls *tls) { int r; - tor_assert(tls && tls->ssl); + tor_assert(tls); + tor_assert(tls->ssl); tor_assert(tls->state == TOR_TLS_ST_HANDSHAKE); if (tls->isServer) { r = SSL_accept(tls->ssl); @@ -512,7 +518,8 @@ tor_tls_shutdown(tor_tls *tls) { int r, err; char buf[128]; - tor_assert(tls && tls->ssl); + tor_assert(tls); + tor_assert(tls->ssl); while (1) { if (tls->state == TOR_TLS_ST_SENTCLOSE) { |