Oh. And apparently, msvc6 doesnt think very much of doing u64-and-double arithmetic either.

svn:r6785
This commit is contained in:
Nick Mathewson 2006-07-18 02:24:01 +00:00
parent 77c28d112b
commit 7fcb267e24
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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;