diff options
author | David Goulet <dgoulet@torproject.org> | 2018-09-05 13:37:37 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-09-07 14:03:55 -0400 |
commit | c76d00abfa779059b2936e5b84c032d0e36726d4 (patch) | |
tree | bffc22eca9bc5256d1d2979e5de66172bdaafbec /src/test/hs_test_helpers.c | |
parent | 5e1d36c7db50d977c4a9a1ed9e80ac9800a6077e (diff) | |
download | tor-c76d00abfa779059b2936e5b84c032d0e36726d4.tar.gz tor-c76d00abfa779059b2936e5b84c032d0e36726d4.zip |
hs-v3: Make hs_desc_build_fake_authorized_client() return an object
Return a newly allocated fake client authorization object instead of taking
the object as a parameter.
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/hs_test_helpers.c b/src/test/hs_test_helpers.c index f8c582afc8..4e13ba43a7 100644 --- a/src/test/hs_test_helpers.c +++ b/src/test/hs_test_helpers.c @@ -138,10 +138,8 @@ hs_helper_build_hs_desc_impl(unsigned int no_ip, desc->superencrypted_data.clients = smartlist_new(); for (i = 0; i < HS_DESC_AUTH_CLIENT_MULTIPLE; i++) { - hs_desc_authorized_client_t *desc_client; - desc_client = tor_malloc_zero(sizeof(hs_desc_authorized_client_t)); - - hs_desc_build_fake_authorized_client(desc_client); + hs_desc_authorized_client_t *desc_client = + hs_desc_build_fake_authorized_client(); smartlist_add(desc->superencrypted_data.clients, desc_client); } |