1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Coverity 189186: hrtimer calculation overflow

This commit is contained in:
Andy Green 2018-04-04 10:46:57 +08:00
parent 2b180b21ce
commit de4c1303f5

View file

@ -204,7 +204,7 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
lws_pt_lock(pt, __func__);
/* don't stay in poll wait longer than next hr timeout */
lws_usec_t t = __lws_hrtimer_service(pt);
if (timeout_ms * 1000 > t)
if ((lws_usec_t)timeout_ms * 1000 > t)
timeout_ms = t / 1000;
lws_pt_unlock(pt);
}