aboutsummaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-02-09 12:32:10 -0500
committerNick Mathewson <nickm@torproject.org>2010-02-09 12:32:10 -0500
commitc0d682686ad8df66b1f6680b1185853532f24429 (patch)
tree5f2bc651108569b0b1c034fd326ee958e62c4a39 /src/or/dns.c
parent080e8f50f87fb7c0c099b1341173fa05c82a42e8 (diff)
downloadtor-c0d682686ad8df66b1f6680b1185853532f24429.tar.gz
tor-c0d682686ad8df66b1f6680b1185853532f24429.zip
Make tor_addr_copy() conform to memcpy requirements
The src and dest of a memcpy() call aren't supposed to overlap, but we were sometimes calling tor_addr_copy() as a no-op. Also, tor_addr_assign was a redundant copy of tor_addr_copy(); this patch removes it.
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 08bff763a3..c055c885b7 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -655,7 +655,7 @@ dns_resolve_impl(edge_connection_t *exitconn, int is_resolve,
* know the answer. */
if (tor_addr_from_str(&addr, exitconn->_base.address) >= 0) {
if (tor_addr_family(&addr) == AF_INET) {
- tor_addr_assign(&exitconn->_base.addr, &addr);
+ tor_addr_copy(&exitconn->_base.addr, &addr);
exitconn->address_ttl = DEFAULT_DNS_TTL;
return 1;
} else {