mirror of https://github.com/xzeldon/htop.git
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;
|
*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;
|
||||||
|
|
Loading…
Reference in New Issue