diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:27:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:27:27 -0400 |
commit | 0cbcbc3412b667537b6ec54da0a4c9173a19d6de (patch) | |
tree | 6cf0e59b26854a49be2326d49f57189a48e31b60 /src/or/microdesc.c | |
parent | 9964c314c6c6af4b921875c973f28f8d01b2e9a2 (diff) | |
download | tor-0cbcbc3412b667537b6ec54da0a4c9173a19d6de.tar.gz tor-0cbcbc3412b667537b6ec54da0a4c9173a19d6de.zip |
Re-apply the automated conversion to 0.2.2 to make handle any memcmps that snuck in
Diffstat (limited to 'src/or/microdesc.c')
-rw-r--r-- | src/or/microdesc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 5740c40d5f..139f2f8b5e 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -48,7 +48,7 @@ _microdesc_hash(microdesc_t *md) static INLINE int _microdesc_eq(microdesc_t *a, microdesc_t *b) { - return !memcmp(a->digest, b->digest, DIGEST256_LEN); + return tor_memeq(a->digest, b->digest, DIGEST256_LEN); } HT_PROTOTYPE(microdesc_map, microdesc_t, node, @@ -414,7 +414,7 @@ microdesc_cache_rebuild(microdesc_cache_t *cache, int force) SMARTLIST_FOREACH_BEGIN(wrote, microdesc_t *, md) { tor_assert(md->saved_location == SAVED_IN_CACHE); md->body = (char*)cache->cache_content->data + md->off; - tor_assert(!memcmp(md->body, "onion-key", 9)); + tor_assert(tor_memeq(md->body, "onion-key", 9)); } SMARTLIST_FOREACH_END(md); smartlist_free(wrote); |