diff options
author | Jeremy Allison <jra@samba.org> | 2006-08-25 16:25:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:52 -0500 |
commit | 6365dcef4d753b11a33ae4311a09a4c475f566aa (patch) | |
tree | b3ab7252cc764d1c2c170f8686fc300087c966cf /source3/lib | |
parent | d59fe2834e2bfe6112ceed4938b992be66b55ea7 (diff) | |
download | samba-6365dcef4d753b11a33ae4311a09a4c475f566aa.tar.gz samba-6365dcef4d753b11a33ae4311a09a4c475f566aa.tar.bz2 samba-6365dcef4d753b11a33ae4311a09a4c475f566aa.zip |
r17834: Another bug found by Volker's tests in the build farm !
Correctly map large nt timevals to TIME_T_MAX.
Jeremy.
(This used to be commit 63b13d28795bbce6d9fe9e0aa4f518ef94c44f18)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/time.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c index 192a418e7a..2db10f98d9 100644 --- a/source3/lib/time.c +++ b/source3/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; |