From d5a3bb960d41873ccfde0bbdb4adfb762528069e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 3 Jul 2018 10:43:43 -0400 Subject: Retire U64_TO_DBL and DBL_TO_U64 These were necessary long ago to work around a bug in VC6. --- src/lib/cc/compat_compiler.h | 3 --- src/lib/tls/tortls.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lib') 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 -- cgit v1.2.3-54-g00ecf