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/lib | |
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/lib')
-rw-r--r-- | src/lib/cc/compat_compiler.h | 3 | ||||
-rw-r--r-- | src/lib/tls/tortls.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/cc/compat_compiler.h b/src/lib/cc/compat_compiler.h index 42ceeadd3e..0f1acc381a 100644 --- a/src/lib/cc/compat_compiler.h +++ b/src/lib/cc/compat_compiler.h @@ -106,9 +106,6 @@ #endif /* !defined(HAVE_MACRO__func__) */ #endif /* defined(_MSC_VER) */ -#define U64_TO_DBL(x) ((double) (x)) -#define DBL_TO_U64(x) ((uint64_t) (x)) - #ifdef ENUM_VALS_ARE_SIGNED #define ENUM_BF(t) unsigned #else diff --git a/src/lib/tls/tortls.c b/src/lib/tls/tortls.c index 3eee41bd16..1cd22a7eba 100644 --- a/src/lib/tls/tortls.c +++ b/src/lib/tls/tortls.c @@ -2442,8 +2442,8 @@ tls_get_write_overhead_ratio,(void)) if (total_bytes_written_over_tls == 0) return 1.0; - return U64_TO_DBL(total_bytes_written_by_tls) / - U64_TO_DBL(total_bytes_written_over_tls); + return ((double)total_bytes_written_by_tls) / + ((double)total_bytes_written_over_tls); } /** Implement check_no_tls_errors: If there are any pending OpenSSL |