summaryrefslogtreecommitdiffstats
path: root/pcp/Platform.c
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-01-08 21:38:57 +0100
committerBenBE <BenBE@geshi.org>2023-01-08 22:03:37 +0100
commitd97cf58261d340922c85bee9b9e1670b4f88eafc (patch)
treedaa6eb00a7c84e584255de6421e872179f4e305d /pcp/Platform.c
parent650cf0f13bf667270d0a6a4612437af264667585 (diff)
Improve code readability by creating constants for SWAP memory values
Diffstat (limited to 'pcp/Platform.c')
-rw-r--r--pcp/Platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcp/Platform.c b/pcp/Platform.c
index d1bd0bc4..994cef3c 100644
--- a/pcp/Platform.c
+++ b/pcp/Platform.c
@@ -548,8 +548,8 @@ void Platform_setMemoryValues(Meter* this) {
void Platform_setSwapValues(Meter* this) {
const ProcessList* pl = this->pl;
this->total = pl->totalSwap;
- this->values[0] = pl->usedSwap;
- this->values[1] = pl->cachedSwap;
+ this->values[SWAP_METER_USED] = pl->usedSwap;
+ this->values[SWAP_METER_CACHE] = pl->cachedSwap;
}
void Platform_setZramValues(Meter* this) {

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