summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-10-15 11:36:16 -0400
committerNick Mathewson <nickm@torproject.org>2010-10-15 11:36:16 -0400
commit59cba1767c450f591e542d661c4eddbf01fbb658 (patch)
treebacc2378b766fdc565ba58d2c41e5dfb33b68d70 /src/or/connection.c
parent247ce5876a56cdbbd6a7b3f501476ff10f4bce5e (diff)
downloadtor-59cba1767c450f591e542d661c4eddbf01fbb658.tar.gz
tor-59cba1767c450f591e542d661c4eddbf01fbb658.zip
Make the return value of tor_addr_sockaddr always be signed
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index d1b079a97e..52996e8ea4 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1281,7 +1281,7 @@ connection_connect(connection_t *conn, const char *address,
int s, inprogress = 0;
char addrbuf[256];
struct sockaddr *dest_addr = (struct sockaddr*) addrbuf;
- socklen_t dest_addr_len;
+ int dest_addr_len;
or_options_t *options = get_options();
int protocol_family;
@@ -1337,7 +1337,7 @@ connection_connect(connection_t *conn, const char *address,
log_debug(LD_NET, "Connecting to %s:%u.",
escaped_safe_str_client(address), port);
- if (connect(s, dest_addr, dest_addr_len) < 0) {
+ if (connect(s, dest_addr, (socklen_t)dest_addr_len) < 0) {
int e = tor_socket_errno(s);
if (!ERRNO_IS_CONN_EINPROGRESS(e)) {
/* yuck. kill it. */