summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--battstat/battstat_applet.c6
-rw-r--r--netspeed/src/netspeed.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index 16755717..7f3838ed 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -918,15 +918,15 @@ load_preferences(ProgressData *battstat)
if (DEBUG) g_print("load_preferences()\n");
battstat->red_val = g_settings_get_int (settings, "red-value");
- battstat->red_val = CLAMP (battstat->red_val, 0, 100);
+ battstat->red_val = MIN (battstat->red_val, 100);
battstat->red_value_is_time = g_settings_get_boolean (settings, "red-value-is-time");
/* automatically calculate orangle and yellow values from the red value */
battstat->orange_val = battstat->red_val * ORANGE_MULTIPLIER;
- battstat->orange_val = CLAMP (battstat->orange_val, 0, 100);
+ battstat->orange_val = MIN (battstat->orange_val, 100);
battstat->yellow_val = battstat->red_val * YELLOW_MULTIPLIER;
- battstat->yellow_val = CLAMP (battstat->yellow_val, 0, 100);
+ battstat->yellow_val = MIN (battstat->yellow_val, 100);
battstat->lowbattnotification = g_settings_get_boolean (settings, "low-battery-notification");
battstat->fullbattnot = g_settings_get_boolean (settings, "full-battery-notification");
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c
index 0fdcc3c0..e692d7da 100644
--- a/netspeed/src/netspeed.c
+++ b/netspeed/src/netspeed.c
@@ -380,7 +380,7 @@ update_quality_icon(MateNetspeedApplet *applet)
q = (applet->devinfo->qual);
q /= 25;
- q = CLAMP(q, 0, 3); /* q out of range would crash when accessing qual_surfaces[q] */
+ q = MIN (q, 3); /* q out of range would crash when accessing qual_surfaces[q] */
gtk_image_set_from_surface (GTK_IMAGE(applet->qual_pix), applet->qual_surfaces[q]);
}