[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Use tor_memeq() instead of tor_memcmp() per code review



commit 3b8a40f262b6aeecd52386e89096dc92d7455c1e
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
Date:   Thu Oct 13 23:48:49 2016 +0000

    Use tor_memeq() instead of tor_memcmp() per code review
---
 src/or/entrynodes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index 745dc24..e5b2492 100644
--- a/src/or/entrynodes.c
+++ b/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;
     }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits