mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 01:20:12 +01:00
wifi: refactor nm_wifi_utils_level_to_quality() not to assert
Apparantly, the assert might fail (on i386?). Unclear why that would possibly happen. Anyway, replace the assert.
This commit is contained in:
parent
8cbb6d9e86
commit
e3a582202f
1 changed files with 1 additions and 3 deletions
|
|
@ -777,10 +777,8 @@ nm_wifi_utils_level_to_quality (gint val)
|
|||
val = 100 - (int) ((100.0 * (double) val) / 60.0);
|
||||
} else {
|
||||
/* Assume signal is a "quality" percentage */
|
||||
val = CLAMP (val, 0, 100);
|
||||
}
|
||||
g_assert (val >= 0);
|
||||
|
||||
return (guint32) val;
|
||||
return CLAMP (val, 0, 100);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue