Convert one std::numeric_limits<Dword>::max() to kInfinite

This commit is contained in:
Loo Rong Jie 2018-07-18 09:55:24 +08:00
parent 407252f121
commit 22baa38bf6

View file

@ -133,7 +133,7 @@ class KernelTimeout {
std::numeric_limits<int64_t>::max() - 999999u;
uint64_t ms_from_now =
(std::min<uint64_t>(max_nanos, ns_ - now) + 999999u) / 1000000u;
if (ms_from_now > std::numeric_limits<DWord>::max()) {
if (ms_from_now > kInfinite) {
return kInfinite;
}
return static_cast<DWord>(ms_from_now);