diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-03 10:43:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-03 10:45:43 -0400 |
commit | d5a3bb960d41873ccfde0bbdb4adfb762528069e (patch) | |
tree | 45e5a10184c90df512d54f49ac4b2101ed3a258c /src/or/hibernate.c | |
parent | 9568c0ce3d3885a41ca44ac030b04d089ac56a40 (diff) | |
download | tor-d5a3bb960d41873ccfde0bbdb4adfb762528069e.tar.gz tor-d5a3bb960d41873ccfde0bbdb4adfb762528069e.zip |
Retire U64_TO_DBL and DBL_TO_U64
These were necessary long ago to work around a bug in VC6.
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r-- | src/or/hibernate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c index c6190bc89c..30a5edc1f2 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -799,7 +799,7 @@ hibernate_soft_limit_reached(void) * - We have used up 95% of our bytes. * - We have less than 500MB of bytes left. */ - uint64_t soft_limit = DBL_TO_U64(U64_TO_DBL(acct_max) * SOFT_LIM_PCT); + uint64_t soft_limit = (uint64_t) (acct_max * SOFT_LIM_PCT); if (acct_max > SOFT_LIM_BYTES && acct_max - SOFT_LIM_BYTES > soft_limit) { soft_limit = acct_max - SOFT_LIM_BYTES; } @@ -1227,4 +1227,3 @@ hibernate_set_state_for_testing_(hibernate_state_t newstate) hibernate_state = newstate; } #endif /* defined(TOR_UNIT_TESTS) */ - |