diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-22 19:09:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-22 19:09:45 +0000 |
commit | e7db789e82a7a2edc5c7e8230265f8ec83021f69 (patch) | |
tree | c8af0a1fe11383d565d916634a7c0d4c963ce4ec /src/or/connection_or.c | |
parent | a20eda5669cc5ce8b8c02d16ea80f642b7de64f9 (diff) | |
download | tor-e7db789e82a7a2edc5c7e8230265f8ec83021f69.tar.gz tor-e7db789e82a7a2edc5c7e8230265f8ec83021f69.zip |
r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
More 64-to-32 fixes. Partial backport candidate. still not done.
svn:r13680
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index cb881fc571..5d9800d093 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 <b>or_protocol_versions</b>. */ 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 <b>v</b> 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)); |