core: minor cleanup of integer multiplication in _sleep_duration_convert_ms_to_us()

Cast to unsigned int64. Also add parenthesis, even if not strictly
necessary.
This commit is contained in:
Thomas Haller 2021-05-27 09:01:49 +02:00
parent 07193dabd1
commit 90818b5391
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -585,7 +585,7 @@ static gulong
_sleep_duration_convert_ms_to_us(guint32 sleep_duration_msec)
{
if (sleep_duration_msec > 0) {
guint64 x = (gint64) sleep_duration_msec * (guint64) 1000L;
guint64 x = ((guint64) sleep_duration_msec) * 1000UL;
return x < G_MAXULONG ? (gulong) x : G_MAXULONG;
}