summaryrefslogtreecommitdiff
path: root/src/or/shared_random.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-06 12:35:37 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-06 12:35:37 -0400
commit5927ed8d3324c39fd8aa3d496d119b37b97a1d73 (patch)
tree60fd91a8aaeaf9406658402537b350f7813563b6 /src/or/shared_random.c
parent4e3f9c1f3af6292f30799f005f6df8f9c1bc7fee (diff)
downloadtor-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/or/shared_random.c')
-rw-r--r--src/or/shared_random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/shared_random.c b/src/or/shared_random.c
index 19564f5924..e672a416be 100644
--- a/src/or/shared_random.c
+++ b/src/or/shared_random.c
@@ -578,8 +578,8 @@ commit_is_authoritative(const sr_commit_t *commit,
tor_assert(commit);
tor_assert(voter_key);
- return !memcmp(commit->rsa_identity, voter_key,
- sizeof(commit->rsa_identity));
+ return fast_memeq(commit->rsa_identity, voter_key,
+ sizeof(commit->rsa_identity));
}
/* Decide if the newly received <b>commit</b> should be kept depending on