diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-03-12 17:43:23 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2021-03-12 17:43:23 +0100 |
commit | 23797e730ef79408deb055afb48e6470824f31d9 (patch) | |
tree | 60796f9e6056014e3040fa0db50e0a7e321e4d80 /CPUMeter.c | |
parent | 0cfc9b09805679cf16bec30b0dc7a769a269d628 (diff) |
CPUMeter_init: compactify branches
Diffstat (limited to 'CPUMeter.c')
-rw-r--r-- | CPUMeter.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -41,13 +41,13 @@ typedef struct CPUMeterData_ { static void CPUMeter_init(Meter* this) { int cpu = this->param; - if (this->pl->cpuCount > 1) { + if (cpu == 0) { + Meter_setCaption(this, "Avg"); + } else if (this->pl->cpuCount > 1) { char caption[10]; xSnprintf(caption, sizeof(caption), "%3d", Settings_cpuId(this->pl->settings, cpu - 1)); Meter_setCaption(this, caption); } - if (this->param == 0) - Meter_setCaption(this, "Avg"); } static void CPUMeter_updateValues(Meter* this) { |