diff options
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 7150fce407..bc146c7c36 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2358,7 +2358,7 @@ client_likes_consensus(networkstatus_t *v, const char *want_url) SMARTLIST_FOREACH(v->voters, networkstatus_voter_info_t *, vi, { if (vi->signature && - !memcmp(vi->identity_digest, want_digest, want_len)) { + tor_memeq(vi->identity_digest, want_digest, want_len)) { have++; break; }; @@ -3458,10 +3458,10 @@ _compare_pairs(const void **a, const void **b) { const fp_pair_t *fp1 = *a, *fp2 = *b; int r; - if ((r = memcmp(fp1->first, fp2->first, DIGEST_LEN))) + if ((r = tor_memcmp(fp1->first, fp2->first, DIGEST_LEN))) return r; else - return memcmp(fp1->second, fp2->second, DIGEST_LEN); + return tor_memcmp(fp1->second, fp2->second, DIGEST_LEN); } /** Divide a string <b>res</b> of the form FP1-FP2+FP3-FP4...[.z], where each @@ -3577,7 +3577,7 @@ dir_split_resource_into_fingerprints(const char *resource, char *cp = smartlist_get(fp_tmp, i); char *last = smartlist_get(fp_tmp2, smartlist_len(fp_tmp2)-1); - if ((decode_hex && memcmp(cp, last, DIGEST_LEN)) + if ((decode_hex && tor_memcmp(cp, last, DIGEST_LEN)) || (!decode_hex && strcasecmp(cp, last))) smartlist_add(fp_tmp2, cp); else |