From 7ecea3d485a8e39ede377b4e74e5fee5bbfb4edd Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Mon, 21 Sep 2020 18:50:15 +0200 Subject: [PATCH] Use return value of CLAMP function --- linux/Battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/Battery.c b/linux/Battery.c index f92a3176..e45afa4e 100644 --- a/linux/Battery.c +++ b/linux/Battery.c @@ -315,7 +315,7 @@ void Battery_getData(double* level, ACPresence* isOnAC) { *level = NAN; *isOnAC = AC_ERROR; } else { - CLAMP(*level, 0.0, 100.0); + *level = CLAMP(*level, 0.0, 100.0); } Battery_cacheLevel = *level; Battery_cacheIsOnAC = *isOnAC;