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/or/routerset.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/or/routerset.c')
-rw-r--r-- | src/or/routerset.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/routerset.c b/src/or/routerset.c index 58b66ea777..4182dbc5c4 100644 --- a/src/or/routerset.c +++ b/src/or/routerset.c @@ -262,12 +262,12 @@ routerset_add_unknown_ccs(routerset_t **setp, int only_if_some_cc_set) geoip_get_country("A1") >= 0; if (add_unknown) { - smartlist_add(set->country_names, tor_strdup("??")); - smartlist_add(set->list, tor_strdup("{??}")); + smartlist_add_strdup(set->country_names, "??"); + smartlist_add_strdup(set->list, "{??}"); } if (add_a1) { - smartlist_add(set->country_names, tor_strdup("a1")); - smartlist_add(set->list, tor_strdup("{a1}")); + smartlist_add_strdup(set->country_names, "a1"); + smartlist_add_strdup(set->list, "{a1}"); } if (add_unknown || add_a1) { |