aboutsummaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorovercaffeinated <overcaffeinated@airmail.cc>2016-10-27 10:26:06 +0100
committerovercaffeinated <overcaffeinated@airmail.cc>2016-10-27 10:26:06 +0100
commit265d5446faf2744569931bc54633684711bbf3ba (patch)
tree80c47c0ef835f971f823d2a472ee188c15979638 /src/or/dns.c
parentb8b8b6b70e670cb735b43bc6b90150ab1ed4e2d1 (diff)
downloadtor-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/dns.c')
-rw-r--r--src/or/dns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 5f9813b912..388104f8da 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -1750,7 +1750,7 @@ wildcard_increment_answer(const char *id)
"invalid addresses. Apparently they are hijacking DNS failures. "
"I'll try to correct for this by treating future occurrences of "
"\"%s\" as 'not found'.", id, *ip, id);
- smartlist_add(dns_wildcard_list, tor_strdup(id));
+ smartlist_add_strdup(dns_wildcard_list, id);
}
if (!dns_wildcard_notice_given)
control_event_server_status(LOG_NOTICE, "DNS_HIJACKED");
@@ -1774,7 +1774,7 @@ add_wildcarded_test_address(const char *address)
n_test_addrs = get_options()->ServerDNSTestAddresses ?
smartlist_len(get_options()->ServerDNSTestAddresses) : 0;
- smartlist_add(dns_wildcarded_test_address_list, tor_strdup(address));
+ smartlist_add_strdup(dns_wildcarded_test_address_list, address);
n = smartlist_len(dns_wildcarded_test_address_list);
if (n > n_test_addrs/2) {
tor_log(dns_wildcarded_test_address_notice_given ? LOG_INFO : LOG_NOTICE,