mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-28 01:15:05 +03:00
Use return value of CLAMP function
This commit is contained in:
@ -315,7 +315,7 @@ void Battery_getData(double* level, ACPresence* isOnAC) {
|
|||||||
*level = NAN;
|
*level = NAN;
|
||||||
*isOnAC = AC_ERROR;
|
*isOnAC = AC_ERROR;
|
||||||
} else {
|
} else {
|
||||||
CLAMP(*level, 0.0, 100.0);
|
*level = CLAMP(*level, 0.0, 100.0);
|
||||||
}
|
}
|
||||||
Battery_cacheLevel = *level;
|
Battery_cacheLevel = *level;
|
||||||
Battery_cacheIsOnAC = *isOnAC;
|
Battery_cacheIsOnAC = *isOnAC;
|
||||||
|
Reference in New Issue
Block a user