summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 13ffaf9511..63397b5bce 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -773,7 +773,7 @@ dump_desc_fifo_bump_hash(const uint8_t *digest_sha256)
/* Find a match if one exists */
SMARTLIST_FOREACH_BEGIN(descs_dumped, dumped_desc_t *, ent) {
if (ent &&
- memcmp(ent->digest_sha256, digest_sha256, DIGEST256_LEN) == 0) {
+ tor_memeq(ent->digest_sha256, digest_sha256, DIGEST256_LEN)) {
/*
* Save a pointer to the match and remove it from its current
* position.
@@ -919,7 +919,7 @@ dump_desc_populate_one_file, (const char *dirname, const char *f))
}
/* Compare the digests */
- if (memcmp(digest, content_digest, DIGEST256_LEN) != 0) {
+ if (tor_memneq(digest, content_digest, DIGEST256_LEN)) {
/* No match */
log_info(LD_DIR,
"Hash of %s from unparseable descriptors directory didn't "