summaryrefslogtreecommitdiffstats
path: root/CPUMeter.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-09-07 12:24:32 +0200
committercgzones <cgzones@googlemail.com>2020-09-24 18:06:36 +0200
commit3c65d78d77e43de12284417012fad2d8c195770e (patch)
tree77854c971c13784e9e734aecc1aaf5213fc8f98c /CPUMeter.c
parentebcf92464353d44c1d01b5afd286314415a66c96 (diff)
Update CPU freq display to use NAN on error
Diffstat (limited to 'CPUMeter.c')
-rw-r--r--CPUMeter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/CPUMeter.c b/CPUMeter.c
index 62c9971b..badca940 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -42,7 +42,7 @@ static void CPUMeter_updateValues(Meter* this, char* buffer, int size) {
if (this->pl->settings->showCPUFrequency) {
double cpuFrequency = this->values[CPU_METER_FREQUENCY];
char cpuFrequencyBuffer[16];
- if (cpuFrequency < 0) {
+ if (isnan(cpuFrequency)) {
xSnprintf(cpuFrequencyBuffer, sizeof(cpuFrequencyBuffer), "N/A");
} else {
xSnprintf(cpuFrequencyBuffer, sizeof(cpuFrequencyBuffer), "%.0fMHz", cpuFrequency);

© 2014-2024 Faster IT GmbH | imprint | privacy policy