chiark / gitweb /
core: drop now-redundant special-casing of JOB_NOP
authorMichal Schmidt <mschmidt@redhat.com>
Wed, 26 Nov 2014 15:33:45 +0000 (16:33 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Wed, 26 Nov 2014 15:33:45 +0000 (16:33 +0100)
job_type_is_conflicting(X, JOB_NOP) correctly gives: false.

job_type_allows_late_merge(JOB_NOP) && job_type_is_superset(X, JOB_NOP)
correctly gives: true.

src/core/job.c

index 1411603e0b6d51fa6bd8402ee7b9b817ac2bbe4e..9adc3fda6a2da2fbbd720b8cfa5275de8cfc7ba6 100644 (file)
@@ -160,12 +160,12 @@ Job* job_install(Job *j) {
         uj = *pj;
 
         if (uj) {
-                if (j->type != JOB_NOP && job_type_is_conflicting(uj->type, j->type))
+                if (job_type_is_conflicting(uj->type, j->type))
                         job_finish_and_invalidate(uj, JOB_CANCELED, false);
                 else {
                         /* not conflicting, i.e. mergeable */
 
-                        if (j->type == JOB_NOP || uj->state == JOB_WAITING ||
+                        if (uj->state == JOB_WAITING ||
                             (job_type_allows_late_merge(j->type) && job_type_is_superset(uj->type, j->type))) {
                                 job_merge_into_installed(uj, j);
                                 log_debug_unit(uj->unit->id,