From 560a04ad25c77a8c5bf4cec112a3d8da8df6272c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 7 Jan 2023 17:46:15 +0100 Subject: Improve code readability by creating constants for memory values --- dragonflybsd/Platform.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dragonflybsd') diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c index ea5f4fa4..b3a82bf3 100644 --- a/dragonflybsd/Platform.c +++ b/dragonflybsd/Platform.c @@ -208,11 +208,11 @@ void Platform_setMemoryValues(Meter* this) { const ProcessList* pl = this->pl; this->total = pl->totalMem; - this->values[0] = pl->usedMem; - this->values[1] = pl->buffersMem; - // this->values[2] = "shared memory, like tmpfs and shm" - this->values[3] = pl->cachedMem; - // this->values[4] = "available memory" + this->values[MEMORY_METER_USED] = pl->usedMem; + this->values[MEMORY_METER_BUFFERS] = pl->buffersMem; + // this->values[MEMORY_METER_SHARED] = "shared memory, like tmpfs and shm" + this->values[MEMORY_METER_CACHE] = pl->cachedMem; + // this->values[MEMORY_METER_AVAILABLE] = "available memory" } void Platform_setSwapValues(Meter* this) { -- cgit v1.2.3