diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-06 12:35:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-06 12:35:37 -0400 |
commit | 5927ed8d3324c39fd8aa3d496d119b37b97a1d73 (patch) | |
tree | 60fd91a8aaeaf9406658402537b350f7813563b6 /src/test/bench.c | |
parent | 4e3f9c1f3af6292f30799f005f6df8f9c1bc7fee (diff) | |
download | tor-5927ed8d3324c39fd8aa3d496d119b37b97a1d73.tar.gz tor-5927ed8d3324c39fd8aa3d496d119b37b97a1d73.zip |
checkSpace.pl now forbids more identifiers.
The functions it warns about are:
assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc,
strdup, strndup, calloc.
Also, fix a few lingering instances of these in the code. Use other
conventions to indicate _intended_ use of assert and
malloc/realloc/etc.
Diffstat (limited to 'src/test/bench.c')
-rw-r--r-- | src/test/bench.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/bench.c b/src/test/bench.c index f1cf715f30..f373019b95 100644 --- a/src/test/bench.c +++ b/src/test/bench.c @@ -557,7 +557,7 @@ bench_dh(void) dh_b, dh_pubkey_a, sizeof(dh_pubkey_a), secret_b, sizeof(secret_b)); tor_assert(slen_a == slen_b); - tor_assert(!memcmp(secret_a, secret_b, slen_a)); + tor_assert(fast_memeq(secret_a, secret_b, slen_a)); crypto_dh_free(dh_a); crypto_dh_free(dh_b); } @@ -595,7 +595,7 @@ bench_ecdh_impl(int nid, const char *name) NULL); tor_assert(slen_a == slen_b); - tor_assert(!memcmp(secret_a, secret_b, slen_a)); + tor_assert(fast_memeq(secret_a, secret_b, slen_a)); EC_KEY_free(dh_a); EC_KEY_free(dh_b); } |