Browse Source

Use tor_memeq() instead of tor_memcmp() per code review

Andrea Shepard 7 years ago
parent
commit
3b8a40f262
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/entrynodes.c

+ 1 - 1
src/or/entrynodes.c

@@ -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;
     }