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 --- TasksMeter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'TasksMeter.c') diff --git a/TasksMeter.c b/TasksMeter.c index 2116e322..562cc8fc 100644 --- a/TasksMeter.c +++ b/TasksMeter.c @@ -24,7 +24,7 @@ static const int TasksMeter_attributes[] = { }; static void TasksMeter_updateValues(Meter* this, char* buffer, int len) { - ProcessList* pl = this->pl; + const ProcessList* pl = this->pl; this->values[0] = pl->kernelThreads; this->values[1] = pl->userlandThreads; this->values[2] = pl->totalTasks - pl->kernelThreads - pl->userlandThreads; @@ -32,7 +32,7 @@ static void TasksMeter_updateValues(Meter* this, char* buffer, int len) { if (pl->totalTasks > this->total) { this->total = pl->totalTasks; } - if (this->pl->settings->hideKernelThreads) { + if (pl->settings->hideKernelThreads) { this->values[0] = 0; } xSnprintf(buffer, len, "%d/%d", (int) this->values[3], (int) this->total); -- cgit v1.2.3