mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-11 16:30:39 +01:00
core: avoid lgtm warning in _sleep_duration_convert_ms_to_us()
return x < G_MAXULONG ? (gulong) x : G_MAXULONG; ^^^ Comparison is always true because x <= 4294967295000.
This commit is contained in:
parent
ecd5d07b3a
commit
bc05f4b750
1 changed files with 2 additions and 1 deletions
|
|
@ -587,7 +587,8 @@ _sleep_duration_convert_ms_to_us(guint32 sleep_duration_msec)
|
|||
if (sleep_duration_msec > 0) {
|
||||
guint64 x = ((guint64) sleep_duration_msec) * 1000UL;
|
||||
|
||||
return x < G_MAXULONG ? (gulong) x : G_MAXULONG;
|
||||
nm_assert(x < G_MAXULONG);
|
||||
return x;
|
||||
}
|
||||
return G_USEC_PER_SEC / 20;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue