summaryrefslogtreecommitdiff
path: root/src/test/test_dir.c
diff options
context:
space:
mode:
authorovercaffeinated <overcaffeinated@airmail.cc>2016-10-27 11:15:57 +0100
committerovercaffeinated <overcaffeinated@airmail.cc>2016-10-27 11:15:57 +0100
commite2577cce0c1a184e1278a49fb58382a995436d17 (patch)
tree2cc2960fbb5a075e47b159aedc12a2b9c701af7d /src/test/test_dir.c
parent265d5446faf2744569931bc54633684711bbf3ba (diff)
downloadtor-e2577cce0c1a184e1278a49fb58382a995436d17.tar.gz
tor-e2577cce0c1a184e1278a49fb58382a995436d17.zip
Convert remaining files to smartlist_add_strdup
The coccinelle script produced errors with these test files so convert the remaining cases of smartlist_add to smartlist_add_strdup by hand.
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r--src/test/test_dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 91f59f2a21..94ba052896 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -812,7 +812,7 @@ test_dir_load_routers(void *arg)
#define ADD(str) \
do { \
tt_int_op(0,OP_EQ,router_get_router_hash(str, strlen(str), buf)); \
- smartlist_add(wanted, tor_strdup(hex_str(buf, DIGEST_LEN))); \
+ smartlist_add_strdup(wanted, hex_str(buf, DIGEST_LEN)); \
} while (0)
MOCK(router_get_dl_status_by_descriptor_digest, mock_router_get_dl_status);
@@ -932,7 +932,7 @@ test_dir_load_extrainfo(void *arg)
#define ADD(str) \
do { \
tt_int_op(0,OP_EQ,router_get_extrainfo_hash(str, strlen(str), buf)); \
- smartlist_add(wanted, tor_strdup(hex_str(buf, DIGEST_LEN))); \
+ smartlist_add_strdup(wanted, hex_str(buf, DIGEST_LEN)); \
} while (0)
mock_ei_insert_list = smartlist_new();