summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-07-18 02:24:01 +0000
committerNick Mathewson <nickm@torproject.org>2006-07-18 02:24:01 +0000
commitd7e14d749df99a56685b0f8943d2055da5d97dc7 (patch)
treea0f4e8760048f3bde546b9c057dc7109cb24b295
parent54e645c6d6adda4be7910886753a7c2a5244a811 (diff)
downloadtor-d7e14d749df99a56685b0f8943d2055da5d97dc7.tar.gz
tor-d7e14d749df99a56685b0f8943d2055da5d97dc7.zip
Oh. And apparently, msvc6 doesnt think very much of doing u64-and-double arithmetic either.
svn:r6785
-rw-r--r--trunk/src/or/hibernate.c3
-rw-r--r--trunk/src/or/main.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/trunk/src/or/hibernate.c b/trunk/src/or/hibernate.c
index b41bf44ed9..5f1131da71 100644
--- a/trunk/src/or/hibernate.c
+++ b/trunk/src/or/hibernate.c
@@ -683,7 +683,8 @@ hibernate_hard_limit_reached(void)
static int
hibernate_soft_limit_reached(void)
{
- uint64_t soft_limit = DBL_TO_U64((get_options()->AccountingMax) * .95);
+ uint64_t soft_limit = DBL_TO_U64(U64_TO_DBL(get_options()->AccountingMax)
+ * .95);
if (!soft_limit)
return 0;
return n_bytes_read_in_interval >= soft_limit
diff --git a/trunk/src/or/main.c b/trunk/src/or/main.c
index f6f314c4a1..5941241d18 100644
--- a/trunk/src/or/main.c
+++ b/trunk/src/or/main.c
@@ -1360,11 +1360,11 @@ dumpstats(int severity)
if (stats_n_data_cells_packaged)
log(severity,LD_NET,"Average packaged cell fullness: %2.3f%%",
100*(U64_TO_DBL(stats_n_data_bytes_packaged) /
- (stats_n_data_cells_packaged*RELAY_PAYLOAD_SIZE)) );
+ U64_TO_DBL(stats_n_data_cells_packaged*RELAY_PAYLOAD_SIZE)) );
if (stats_n_data_cells_received)
log(severity,LD_NET,"Average delivered cell fullness: %2.3f%%",
100*(U64_TO_DBL(stats_n_data_bytes_received) /
- (stats_n_data_cells_received*RELAY_PAYLOAD_SIZE)) );
+ U64_TO_DBL(stats_n_data_cells_received*RELAY_PAYLOAD_SIZE)) );
if (now - time_of_process_start >= 0)
elapsed = now - time_of_process_start;