From 63b13d28795bbce6d9fe9e0aa4f518ef94c44f18 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Aug 2006 16:25:09 +0000 Subject: [PATCH] r17834: Another bug found by Volker's tests in the build farm ! Correctly map large nt timevals to TIME_T_MAX. Jeremy. --- source/lib/time.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source/lib/time.c b/source/lib/time.c index 192a418e7a1..2db10f98d9d 100644 --- a/source/lib/time.c +++ b/source/lib/time.c @@ -223,12 +223,6 @@ static struct timespec nt_time_to_unix_timespec(NTTIME *nt) return ret; } - if ((nt->high == 0x7fffffff) && (nt->low == 0xffffffff)) { - ret.tv_sec = TIME_T_MAX; - ret.tv_nsec = 0; - return ret; - } - d = (((uint64)nt->high) << 32 ) + ((uint64)nt->low); /* d is now in 100ns units, since jan 1st 1601". Save off the ns fraction. */ @@ -247,7 +241,7 @@ static struct timespec nt_time_to_unix_timespec(NTTIME *nt) return ret; } - if (((time_t)d) >= TIME_T_MAX) { + if ((d >= (uint64)TIME_T_MAX)) { ret.tv_sec = TIME_T_MAX; ret.tv_nsec = 0; return ret;