diff options
author | Ivan Shapovalov <intelfx@intelfx.name> | 2023-03-12 20:17:03 +0400 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-04-23 16:00:17 +0200 |
commit | b2ada278403e643a3bc339783740f262b7879803 (patch) | |
tree | 081651d2cfa0c86d02c633cea81dcc40a233c825 /SwapMeter.c | |
parent | 1b640dff5759d73458204c87e217dab8759badd9 (diff) |
{Memory,Swap}Meter: make sure new constants are used consistently
Diffstat (limited to 'SwapMeter.c')
-rw-r--r-- | SwapMeter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/SwapMeter.c b/SwapMeter.c index c0f48200..fea8e88b 100644 --- a/SwapMeter.c +++ b/SwapMeter.c @@ -28,10 +28,10 @@ static void SwapMeter_updateValues(Meter* this) { size_t size = sizeof(this->txtBuffer); int written; - this->values[1] = NAN; /* 'cached' not present on all platforms */ + this->values[SWAP_METER_CACHE] = NAN; /* 'cached' not present on all platforms */ Platform_setSwapValues(this); - written = Meter_humanUnit(buffer, this->values[0], size); + written = Meter_humanUnit(buffer, this->values[SWAP_METER_USED], size); METER_BUFFER_CHECK(buffer, size, written); METER_BUFFER_APPEND_CHR(buffer, size, '/'); @@ -64,7 +64,7 @@ const MeterClass SwapMeter_class = { }, .updateValues = SwapMeter_updateValues, .defaultMode = BAR_METERMODE, - .maxItems = 2, + .maxItems = SWAP_METER_ITEMCOUNT, .total = 100.0, .attributes = SwapMeter_attributes, .name = "Swap", |