aboutsummaryrefslogtreecommitdiff
path: root/src/test/hs_test_helpers.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-09-10 10:28:35 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-09-10 10:28:35 -0400
commit7ff67d0e90d1cdf206747649df79dbb88a7467a8 (patch)
treed466d2bfe115b2e14305ba3ba132eb108997d433 /src/test/hs_test_helpers.c
parent064d3e7497216c78b05ccd30422dc522bc337db8 (diff)
downloadtor-7ff67d0e90d1cdf206747649df79dbb88a7467a8.tar.gz
tor-7ff67d0e90d1cdf206747649df79dbb88a7467a8.zip
test: Fix coverity CID 1439129
One HSv3 unit test used "tor_memeq()" without checking the return value. This commit changes that to use "tt_mem_op()" to actually make the test validate something :). Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/hs_test_helpers.c')
-rw-r--r--src/test/hs_test_helpers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/hs_test_helpers.c b/src/test/hs_test_helpers.c
index 4e13ba43a7..dcec1b9d48 100644
--- a/src/test/hs_test_helpers.c
+++ b/src/test/hs_test_helpers.c
@@ -241,11 +241,11 @@ hs_helper_desc_equal(const hs_descriptor_t *desc1,
hs_desc_authorized_client_t
*client1 = smartlist_get(desc1->superencrypted_data.clients, i),
*client2 = smartlist_get(desc2->superencrypted_data.clients, i);
- tor_memeq(client1->client_id, client2->client_id,
+ tt_mem_op(client1->client_id, OP_EQ, client2->client_id,
sizeof(client1->client_id));
- tor_memeq(client1->iv, client2->iv,
+ tt_mem_op(client1->iv, OP_EQ, client2->iv,
sizeof(client1->iv));
- tor_memeq(client1->encrypted_cookie, client2->encrypted_cookie,
+ tt_mem_op(client1->encrypted_cookie, OP_EQ, client2->encrypted_cookie,
sizeof(client1->encrypted_cookie));
}
}