From e7db789e82a7a2edc5c7e8230265f8ec83021f69 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 22 Feb 2008 19:09:45 +0000 Subject: r14399@tombo: nickm | 2008-02-22 14:09:38 -0500 More 64-to-32 fixes. Partial backport candidate. still not done. svn:r13680 --- src/or/connection_or.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/or/connection_or.c') diff --git a/src/or/connection_or.c b/src/or/connection_or.c index cb881fc57..5d9800d09 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -288,7 +288,7 @@ connection_or_flushed_some(or_connection_t *conn) /* If we're under the low water mark, add cells until we're just over the * high water mark. */ if (datalen < OR_CONN_LOWWATER) { - int n = (OR_CONN_HIGHWATER - datalen + CELL_NETWORK_SIZE-1) + ssize_t n = (OR_CONN_HIGHWATER - datalen + CELL_NETWORK_SIZE-1) / CELL_NETWORK_SIZE; while (conn->active_circuits && n > 0) { int flushed = connection_or_flush_from_first_active_circuit(conn, 1); @@ -1023,7 +1023,7 @@ connection_or_send_destroy(uint16_t circ_id, or_connection_t *conn, int reason) static const uint16_t or_protocol_versions[] = { 1, 2 }; /** Number of versions in or_protocol_versions. */ static const int n_or_protocol_versions = - sizeof(or_protocol_versions)/sizeof(uint16_t); + (int)( sizeof(or_protocol_versions)/sizeof(uint16_t) ); /** Return true iff v is a link protocol version that this Tor * implementation believes it can support. */ @@ -1074,7 +1074,7 @@ connection_or_send_netinfo(or_connection_t *conn) cell.command = CELL_NETINFO; /* Their address. */ - set_uint32(cell.payload, htonl(now)); + set_uint32(cell.payload, htonl((uint32_t)now)); cell.payload[4] = RESOLVED_TYPE_IPV4; cell.payload[5] = 4; set_uint32(cell.payload+6, htonl(conn->_base.addr)); -- cgit v1.2.3