From b86d6b75c02576eae7c19c9018273a176b1c376a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Jan 2007 02:58:01 +0000 Subject: r20695: Remove duplication of constants. Jeremy. (This used to be commit 66cca893e1aa035fa0aa05c0d542848f084fac31) --- source3/lib/time.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/source3/lib/time.c b/source3/lib/time.c index e211bda3fb..f45a8d3e84 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -56,8 +56,6 @@ void GetTimeOfDay(struct timeval *tval) #endif } -#define TIME_FIXUP_CONSTANT 11644473600LL - struct timespec convert_time_t_to_timespec(time_t t) { struct timespec ts; @@ -107,7 +105,7 @@ void unix_to_nt_time(NTTIME *nt, time_t t) } t2 = t; - t2 += TIME_FIXUP_CONSTANT; + t2 += TIME_FIXUP_CONSTANT_INT; t2 *= 1000*1000*10; *nt = t2; @@ -545,7 +543,7 @@ struct timeval timeval_until(const struct timeval *tv1, NTTIME timeval_to_nttime(const struct timeval *tv) { return 10*(tv->tv_usec + - ((TIME_FIXUP_CONSTANT + (uint64_t)tv->tv_sec) * 1000000)); + ((TIME_FIXUP_CONSTANT_INT + (uint64_t)tv->tv_sec) * 1000000)); } /******************************************************************* @@ -1075,13 +1073,6 @@ time_t cli_make_unix_date3(struct cli_state *cli, void *date_ptr) return make_unix_date3(date_ptr, cli->serverzone); } -#if (SIZEOF_LONG == 8) -#define TIME_FIXUP_CONSTANT_INT 11644473600L -#elif (SIZEOF_LONG_LONG == 8) -#define TIME_FIXUP_CONSTANT_INT 11644473600LL -#endif - - /* Large integer version. */ struct timespec nt_time_to_unix_timespec(NTTIME *nt) { -- cgit