Commit 22baa38b by Loo Rong Jie

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

parent 407252f1
...@@ -133,7 +133,7 @@ class KernelTimeout { ...@@ -133,7 +133,7 @@ class KernelTimeout {
std::numeric_limits<int64_t>::max() - 999999u; std::numeric_limits<int64_t>::max() - 999999u;
uint64_t ms_from_now = uint64_t ms_from_now =
(std::min<uint64_t>(max_nanos, ns_ - now) + 999999u) / 1000000u; (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 kInfinite;
} }
return static_cast<DWord>(ms_from_now); return static_cast<DWord>(ms_from_now);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment