diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-07-07 11:32:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-07 11:32:15 -0400 |
commit | c7d2a67274549e71381f87c2fd3e8adad1c1abc9 (patch) | |
tree | a88515641d31a3b9b2be641b8bdc6f90aa059ed2 /src/or/circuitbuild.c | |
parent | c387cc5022f84ebb452278747f36f1c7d8b32187 (diff) | |
download | tor-c7d2a67274549e71381f87c2fd3e8adad1c1abc9.tar.gz tor-c7d2a67274549e71381f87c2fd3e8adad1c1abc9.zip |
Fix a couple of clang warnings
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 3a8da2a41a..257edab50b 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1426,12 +1426,13 @@ circuit_init_cpath_crypto(crypt_path_t *cpath, tor_assert(digest_len != 0); tor_assert(cipher_key_len != 0); + const int cipher_key_bits = (int) cipher_key_len * 8; crypto_digest_add_bytes(cpath->f_digest, key_data, digest_len); crypto_digest_add_bytes(cpath->b_digest, key_data+digest_len, digest_len); cpath->f_crypto = crypto_cipher_new_with_bits(key_data+(2*digest_len), - cipher_key_len*8); + cipher_key_bits); if (!cpath->f_crypto) { log_warn(LD_BUG,"Forward cipher initialization failed."); return -1; @@ -1439,7 +1440,7 @@ circuit_init_cpath_crypto(crypt_path_t *cpath, cpath->b_crypto = crypto_cipher_new_with_bits( key_data+(2*digest_len)+cipher_key_len, - cipher_key_len*8); + cipher_key_bits); if (!cpath->b_crypto) { log_warn(LD_BUG,"Backward cipher initialization failed."); return -1; |