diff options
author | rbuj <[email protected]> | 2020-07-21 13:33:09 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-07-26 11:11:51 +0200 |
commit | 88e553e3b557b5a4f92199aeddf8b0e5bb7868a8 (patch) | |
tree | 0bf79ed3a4758f8fca7d35a34abbe8bc7e84186b /multiload/main.c | |
parent | 626b731a6bcd701bf16b1164972eb11af344271c (diff) | |
download | mate-applets-88e553e3b557b5a4f92199aeddf8b0e5bb7868a8.tar.bz2 mate-applets-88e553e3b557b5a4f92199aeddf8b0e5bb7868a8.tar.xz |
multiload: set and check the ranges for all network thresholds
Diffstat (limited to 'multiload/main.c')
-rw-r--r-- | multiload/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/multiload/main.c b/multiload/main.c index db7ef3cc..45756891 100644 --- a/multiload/main.c +++ b/multiload/main.c @@ -378,9 +378,9 @@ multiload_create_graphs(MultiloadApplet *ma) speed = g_settings_get_int (ma->settings, "speed"); size = g_settings_get_int (ma->settings, "size"); - net_threshold1 = g_settings_get_uint (ma->settings, "netthreshold1"); - net_threshold2 = g_settings_get_uint (ma->settings, "netthreshold2"); - net_threshold3 = g_settings_get_uint (ma->settings, "netthreshold3"); + net_threshold1 = CLAMP (g_settings_get_uint (ma->settings, "netthreshold1"), MIN_NET_THRESHOLD1, MAX_NET_THRESHOLD1); + net_threshold2 = CLAMP (g_settings_get_uint (ma->settings, "netthreshold2"), MIN_NET_THRESHOLD2, MAX_NET_THRESHOLD2); + net_threshold3 = CLAMP (g_settings_get_uint (ma->settings, "netthreshold3"), MIN_NET_THRESHOLD3, MAX_NET_THRESHOLD3); if (net_threshold1 >= net_threshold2) { net_threshold1 = net_threshold2 - 1; |