summaryrefslogtreecommitdiff
path: root/src/or/hibernate.c
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
commit7fcb267e2419b7159146ff35ccc3e95d7e6b26f8 (patch)
tree115719fd61d935d2ca0fcd96c546efcb7488e4be /src/or/hibernate.c
parent77c28d112bf8287ec1d1e029af50eb877c2b0f59 (diff)
downloadtor-7fcb267e2419b7159146ff35ccc3e95d7e6b26f8.tar.gz
tor-7fcb267e2419b7159146ff35ccc3e95d7e6b26f8.zip
Oh. And apparently, msvc6 doesnt think very much of doing u64-and-double arithmetic either.
svn:r6785
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r--src/or/hibernate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index b41bf44ed9..5f1131da71 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