mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Use return value of CLAMP function
This commit is contained in:
parent
ba0fca1800
commit
7ecea3d485
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user