diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-09-03 14:34:09 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-09-03 14:34:09 -0700 |
commit | 29d4145a644326680ea1abadd6fd0ab5642261be (patch) | |
tree | 09a8b4cd1fb927e406175415406713ebbfe5f72c /src/core | |
parent | 9afad1433520fe52a6f5527dea23f182825104cd (diff) |
avoid underflow
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/support/sync_win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/support/sync_win32.c b/src/core/support/sync_win32.c index df23492171..f546477067 100644 --- a/src/core/support/sync_win32.c +++ b/src/core/support/sync_win32.c @@ -88,9 +88,9 @@ int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline) { SleepConditionVariableCS(cv, &mu->cs, INFINITE); } else { gpr_timespec now = gpr_now(abs_deadline.clock_type); - gpr_int64 now_ms = now.tv_sec * 1000 + now.tv_nsec / 1000000; + gpr_int64 now_ms = (gpr_int64)now.tv_sec * 1000 + now.tv_nsec / 1000000; gpr_int64 deadline_ms = - abs_deadline.tv_sec * 1000 + abs_deadline.tv_nsec / 1000000; + (gpr_int64)abs_deadline.tv_sec * 1000 + abs_deadline.tv_nsec / 1000000; if (now_ms >= deadline_ms) { timeout = 1; } else { |