diff options
author | overcaffeinated <overcaffeinated@airmail.cc> | 2016-10-27 10:26:06 +0100 |
---|---|---|
committer | overcaffeinated <overcaffeinated@airmail.cc> | 2016-10-27 10:26:06 +0100 |
commit | 265d5446faf2744569931bc54633684711bbf3ba (patch) | |
tree | 80c47c0ef835f971f823d2a472ee188c15979638 /src/test/test_pt.c | |
parent | b8b8b6b70e670cb735b43bc6b90150ab1ed4e2d1 (diff) | |
download | tor-265d5446faf2744569931bc54633684711bbf3ba.tar.gz tor-265d5446faf2744569931bc54633684711bbf3ba.zip |
Automated change to use smartlist_add_strdup
Use the following coccinelle script to change uses of
smartlist_add(sl, tor_strdup(str)) to
smartlist_add_strdup(sl, string) (coccinelle script from nickm
via bug 20048):
@@
expression a;
expression b;
@@
- smartlist_add
+ smartlist_add_strdup
(a,
- tor_strdup(
b
- )
)
Diffstat (limited to 'src/test/test_pt.c')
-rw-r--r-- | src/test/test_pt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_pt.c b/src/test/test_pt.c index e5cdc5f3cd..f93019f1c4 100644 --- a/src/test/test_pt.c +++ b/src/test/test_pt.c @@ -155,9 +155,9 @@ test_pt_get_transport_options(void *arg) opt_str = get_transport_options_for_server_proxy(mp); tt_ptr_op(opt_str, OP_EQ, NULL); - smartlist_add(mp->transports_to_launch, tor_strdup("gruyere")); - smartlist_add(mp->transports_to_launch, tor_strdup("roquefort")); - smartlist_add(mp->transports_to_launch, tor_strdup("stnectaire")); + smartlist_add_strdup(mp->transports_to_launch, "gruyere"); + smartlist_add_strdup(mp->transports_to_launch, "roquefort"); + smartlist_add_strdup(mp->transports_to_launch, "stnectaire"); tt_assert(options); @@ -305,7 +305,7 @@ tor_get_lines_from_handle_replacement(STDIN_HANDLE *handle, smartlist_add_asprintf(retval_sl, "SMETHOD mock%d 127.0.0.1:555%d", times_called, times_called); } else { - smartlist_add(retval_sl, tor_strdup("SMETHODS DONE")); + smartlist_add_strdup(retval_sl, "SMETHODS DONE"); } return retval_sl; |