diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-18 02:24:01 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-18 02:24:01 +0000 |
commit | 7fcb267e2419b7159146ff35ccc3e95d7e6b26f8 (patch) | |
tree | 115719fd61d935d2ca0fcd96c546efcb7488e4be /src | |
parent | 77c28d112bf8287ec1d1e029af50eb877c2b0f59 (diff) | |
download | tor-7fcb267e2419b7159146ff35ccc3e95d7e6b26f8.tar tor-7fcb267e2419b7159146ff35ccc3e95d7e6b26f8.tar.gz |
Oh. And apparently, msvc6 doesnt think very much of doing u64-and-double arithmetic either.
svn:r6785
Diffstat (limited to 'src')
-rw-r--r-- | src/or/hibernate.c | 3 | ||||
-rw-r--r-- | src/or/main.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c index b41bf44ed..5f1131da7 100644 --- a/src/or/hibernate.c +++ b/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/src/or/main.c b/src/or/main.c index f6f314c4a..5941241d1 100644 --- a/src/or/main.c +++ b/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; |