From 1fa9473b07e16ee863c045183251c6613cef375d Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 22 Oct 2025 20:50:17 +0200 Subject: [PATCH] core/job: mark job_type_lookup_merge() and _is_redundant() as const They don't take pointers, hence are eligible for stronger guarantees. --- src/core/job.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/job.h b/src/core/job.h index d8be0b652eb..028281eb5fc 100644 --- a/src/core/job.h +++ b/src/core/job.h @@ -162,7 +162,7 @@ int job_coldplug(Job *j); JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts); void job_dependency_free(JobDependency *l); -JobType job_type_lookup_merge(JobType a, JobType b) _pure_; +JobType job_type_lookup_merge(JobType a, JobType b) _const_; _pure_ static inline bool job_type_is_mergeable(JobType a, JobType b) { return job_type_lookup_merge(a, b) >= 0; @@ -181,7 +181,7 @@ _pure_ static inline bool job_type_is_superset(JobType a, JobType b) { return a == job_type_lookup_merge(a, b); } -bool job_type_is_redundant(JobType a, UnitActiveState b) _pure_; +bool job_type_is_redundant(JobType a, UnitActiveState b) _const_; /* Collapses a state-dependent job type into a simpler type by observing * the state of the unit which it is going to be applied to. */ -- 2.47.3