summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.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/connection_edge.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/connection_edge.c')
-rw-r--r--src/or/connection_edge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 8447853fc1..8bb6742dca 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2607,7 +2607,7 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
if (rh.command == RELAY_COMMAND_BEGIN_DIR) {
tor_assert(or_circ);
if (or_circ->p_conn && !tor_addr_is_null(&or_circ->p_conn->real_addr))
- tor_addr_assign(&n_stream->_base.addr, &or_circ->p_conn->real_addr);
+ tor_addr_copy(&n_stream->_base.addr, &or_circ->p_conn->real_addr);
return connection_exit_connect_dir(n_stream);
}
@@ -2779,7 +2779,7 @@ connection_exit_connect_dir(edge_connection_t *exitconn)
dirconn = dir_connection_new(AF_INET);
- tor_addr_assign(&dirconn->_base.addr, &exitconn->_base.addr);
+ tor_addr_copy(&dirconn->_base.addr, &exitconn->_base.addr);
dirconn->_base.port = 0;
dirconn->_base.address = tor_strdup(exitconn->_base.address);
dirconn->_base.type = CONN_TYPE_DIR;