summaryrefslogtreecommitdiffstats
path: root/src/core/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/job.c b/src/core/job.c
index f04c8a2168..f962881a12 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -368,19 +368,13 @@ bool job_type_is_redundant(JobType a, UnitActiveState b) {
switch (a) {
case JOB_START:
- return
- b == UNIT_ACTIVE ||
- b == UNIT_RELOADING;
+ return IN_SET(b, UNIT_ACTIVE, UNIT_RELOADING);
case JOB_STOP:
- return
- b == UNIT_INACTIVE ||
- b == UNIT_FAILED;
+ return IN_SET(b, UNIT_INACTIVE, UNIT_FAILED);
case JOB_VERIFY_ACTIVE:
- return
- b == UNIT_ACTIVE ||
- b == UNIT_RELOADING;
+ return IN_SET(b, UNIT_ACTIVE, UNIT_RELOADING);
case JOB_RELOAD:
return
@@ -888,7 +882,7 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive, bool alr
goto finish;
}
- if (result == JOB_FAILED || result == JOB_INVALID)
+ if (IN_SET(result, JOB_FAILED, JOB_INVALID))
j->manager->n_failed_jobs++;
job_uninstall(j);