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 --- darwin/Platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'darwin') diff --git a/darwin/Platform.c b/darwin/Platform.c index e9d6caab..38b1a8af 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -278,7 +278,7 @@ void Platform_setSwapValues(Meter* mtr) { sysctl(mib, 2, &swapused, &swlen, NULL, 0); mtr->total = swapused.xsu_total / 1024; - mtr->values[0] = swapused.xsu_used / 1024; + mtr->values[SWAP_METER_USED] = swapused.xsu_used / 1024; } void Platform_setZfsArcValues(Meter* this) { -- cgit v1.2.3