diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-05 23:42:55 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-01-11 20:12:34 +0100 |
commit | d72b0a682ecad0a8d5793022733447e855a61798 (patch) | |
tree | d9bc511bb716030fd73675bd3474e5a043636d73 /Affinity.c | |
parent | 1b2d48bc9aa93254c48d10bb34acde9596b526b9 (diff) |
Mark several non-modified pointer variables const
Diffstat (limited to 'Affinity.c')
-rw-r--r-- | Affinity.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |