From 90818b539120b8d1d11fd2c5ecbbcf7105612c75 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 27 May 2021 09:01:49 +0200 Subject: [PATCH] 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. --- src/core/nm-core-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/nm-core-utils.c b/src/core/nm-core-utils.c index 15cf4d8183..bae9c336e6 100644 --- a/src/core/nm-core-utils.c +++ b/src/core/nm-core-utils.c @@ -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; }