summaryrefslogtreecommitdiffstats
path: root/openbsd
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-21 21:25:50 +0200
committercgzones <cgzones@googlemail.com>2020-10-26 19:30:38 +0100
commit72103e9613a4767a3aad2dd63c629f4a1384880c (patch)
treeec2424d702cb7009bd8d3584583659bd6b74485f /openbsd
parentf757810f489b12d2a98dcb09751003f4ed002538 (diff)
Hold only a const version of the ProcessList in Meters
Diffstat (limited to 'openbsd')
-rw-r--r--openbsd/Platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index eac13c96..9f7cd737 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -189,7 +189,7 @@ double Platform_setCPUValues(Meter* this, int cpu) {
}
void Platform_setMemoryValues(Meter* this) {
- ProcessList* pl = (ProcessList*) this->pl;
+ const ProcessList* pl = this->pl;
long int usedMem = pl->usedMem;
long int buffersMem = pl->buffersMem;
long int cachedMem = pl->cachedMem;
@@ -207,7 +207,7 @@ void Platform_setMemoryValues(Meter* this) {
* Taken almost directly from OpenBSD's top(1)
*/
void Platform_setSwapValues(Meter* this) {
- ProcessList* pl = (ProcessList*) this->pl;
+ const ProcessList* pl = this->pl;
struct swapent *swdev;
unsigned long long int total, used;
int nswap, rnswap, i;

© 2014-2024 Faster IT GmbH | imprint | privacy policy