From 72103e9613a4767a3aad2dd63c629f4a1384880c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Wed, 21 Oct 2020 21:25:50 +0200 Subject: Hold only a const version of the ProcessList in Meters --- dragonflybsd/Platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dragonflybsd') diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c index f01749b7..3eac7deb 100644 --- a/dragonflybsd/Platform.c +++ b/dragonflybsd/Platform.c @@ -149,9 +149,9 @@ int Platform_getMaxPid() { } double Platform_setCPUValues(Meter* this, int cpu) { - DragonFlyBSDProcessList* fpl = (DragonFlyBSDProcessList*) this->pl; + const DragonFlyBSDProcessList* fpl = (const DragonFlyBSDProcessList*) this->pl; int cpus = this->pl->cpuCount; - CPUData* cpuData; + const CPUData* cpuData; if (cpus == 1) { // single CPU box has everything in fpl->cpus[0] @@ -186,7 +186,7 @@ double Platform_setCPUValues(Meter* this, int cpu) { void Platform_setMemoryValues(Meter* this) { // TODO - ProcessList* pl = (ProcessList*) this->pl; + const ProcessList* pl = this->pl; this->total = pl->totalMem; this->values[0] = pl->usedMem; @@ -195,7 +195,7 @@ void Platform_setMemoryValues(Meter* this) { } void Platform_setSwapValues(Meter* this) { - ProcessList* pl = (ProcessList*) this->pl; + const ProcessList* pl = this->pl; this->total = pl->totalSwap; this->values[0] = pl->usedSwap; } -- cgit v1.2.3