From d97cf58261d340922c85bee9b9e1670b4f88eafc Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 8 Jan 2023 21:38:57 +0100 Subject: Improve code readability by creating constants for SWAP memory values --- dragonflybsd/Platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dragonflybsd') diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c index 944df990..769a46ed 100644 --- a/dragonflybsd/Platform.c +++ b/dragonflybsd/Platform.c @@ -218,8 +218,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] = NAN; + this->values[SWAP_METER_USED] = pl->usedSwap; + this->values[SWAP_METER_CACHE] = NAN; } char* Platform_getProcessEnv(pid_t pid) { -- cgit v1.2.3