From: Mike Yuan Date: Wed, 22 Oct 2025 18:50:17 +0000 (+0200) Subject: core/job: mark job_type_lookup_merge() and _is_redundant() as const X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1fa9473b07e16ee863c045183251c6613cef375d;p=thirdparty%2Fsystemd.git core/job: mark job_type_lookup_merge() and _is_redundant() as const They don't take pointers, hence are eligible for stronger guarantees. --- 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. */