diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-21 21:25:50 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-10-26 19:30:38 +0100 |
commit | 72103e9613a4767a3aad2dd63c629f4a1384880c (patch) | |
tree | ec2424d702cb7009bd8d3584583659bd6b74485f /dragonflybsd/Platform.c | |
parent | f757810f489b12d2a98dcb09751003f4ed002538 (diff) |
Hold only a const version of the ProcessList in Meters
Diffstat (limited to 'dragonflybsd/Platform.c')
-rw-r--r-- | dragonflybsd/Platform.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |