summaryrefslogtreecommitdiff
path: root/src/or/hibernate.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-07-17 00:39:05 +0000
committerNick Mathewson <nickm@torproject.org>2006-07-17 00:39:05 +0000
commite572d5990c4ed5100338a4e1ad4cae6a55329b4f (patch)
tree18ec12edf7054392a0203a327a5b4bd11f9026b2 /src/or/hibernate.c
parent169d6c4aca43ea574762f42542a9db4745396ff8 (diff)
downloadtor-e572d5990c4ed5100338a4e1ad4cae6a55329b4f.tar.gz
tor-e572d5990c4ed5100338a4e1ad4cae6a55329b4f.zip
MSVC6 is apparently terrified of unnatural cross-breeding between uint64_t and double, and needs more persuasion than usual to cast one to the other. Issue identified by Frediano Ziglio; patch revised for minimal impact on non-MSVC6 compilers.
svn:r6768
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r--src/or/hibernate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index d4e6ceb078..b41bf44ed9 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -683,7 +683,7 @@ hibernate_hard_limit_reached(void)
static int
hibernate_soft_limit_reached(void)
{
- uint64_t soft_limit = (uint64_t) ((get_options()->AccountingMax) * .95);
+ uint64_t soft_limit = DBL_TO_U64((get_options()->AccountingMax) * .95);
if (!soft_limit)
return 0;
return n_bytes_read_in_interval >= soft_limit