From d72b0a682ecad0a8d5793022733447e855a61798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 5 Jan 2021 23:42:55 +0100 Subject: Mark several non-modified pointer variables const --- Affinity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Affinity.c') diff --git a/Affinity.c b/Affinity.c index c157885b..6b39b399 100644 --- a/Affinity.c +++ b/Affinity.c @@ -52,7 +52,7 @@ void Affinity_add(Affinity* this, int id) { #ifdef HAVE_LIBHWLOC -Affinity* Affinity_get(Process* proc, ProcessList* pl) { +Affinity* Affinity_get(const Process* proc, ProcessList* pl) { hwloc_cpuset_t cpuset = hwloc_bitmap_alloc(); bool ok = (hwloc_get_proc_cpubind(pl->topology, proc->pid, cpuset, HTOP_HWLOC_CPUBIND_FLAG) == 0); Affinity* affinity = NULL; @@ -86,7 +86,7 @@ bool Affinity_set(Process* proc, Arg arg) { #elif defined(HAVE_LINUX_AFFINITY) -Affinity* Affinity_get(Process* proc, ProcessList* pl) { +Affinity* Affinity_get(const Process* proc, ProcessList* pl) { cpu_set_t cpuset; bool ok = (sched_getaffinity(proc->pid, sizeof(cpu_set_t), &cpuset) == 0); if (!ok) -- cgit v1.2.3