]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use tor_memeq() instead of tor_memcmp() per code review
authorAndrea Shepard <andrea@torproject.org>
Thu, 13 Oct 2016 23:48:49 +0000 (23:48 +0000)
committerAndrea Shepard <andrea@torproject.org>
Thu, 13 Oct 2016 23:48:49 +0000 (23:48 +0000)
src/or/entrynodes.c

index 745dc2428fc62deab02d0c813ee0de8f436c50dc..e5b24921004a37fc62bfa0d9f3f0d28909cf61c6 100644 (file)
@@ -2269,7 +2269,7 @@ is_node_used_as_guard_for_guard_selection(guard_selection_t *gs,
   tor_assert(node != NULL);
 
   SMARTLIST_FOREACH_BEGIN(gs->chosen_entry_guards, entry_guard_t *, e) {
-    if (tor_memcmp(e->identity, node->identity, DIGEST_LEN) == 0) {
+    if (tor_memeq(e->identity, node->identity, DIGEST_LEN)) {
       res = 1;
       break;
     }