Correctly map large nt timevals to TIME_T_MAX.
Jeremy.
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. */
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;