git.samba.org
/
vlendec
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d59fe28
)
r17834: Another bug found by Volker's tests in the build farm !
author
Jeremy Allison
<jra@samba.org>
Fri, 25 Aug 2006 16:25:09 +0000
(16:25 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:38:52 +0000
(11:38 -0500)
Correctly map large nt timevals to TIME_T_MAX.
Jeremy.
(This used to be commit
63b13d28795bbce6d9fe9e0aa4f518ef94c44f18
)
source3/lib/time.c
patch
|
blob
|
history
diff --git
a/source3/lib/time.c
b/source3/lib/time.c
index 192a418e7a116019182de291df52bdc3d3183e40..2db10f98d9d934bd57aec5149750d4f75a168a06 100644
(file)
--- 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;