summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 9f7ba9227b..229bd0f73a 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2674,7 +2674,9 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
if (streq(l, "job")) {
if (v[0] == '\0') {
/* new-style serialized job */
- Job *j = job_new_raw(u);
+ Job *j;
+
+ j = job_new_raw(u);
if (!j)
return -ENOMEM;
@@ -2696,12 +2698,11 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
job_free(j);
return r;
}
-
- if (j->state == JOB_RUNNING)
- u->manager->n_running_jobs++;
} else {
/* legacy */
- JobType type = job_type_from_string(v);
+ JobType type;
+
+ type = job_type_from_string(v);
if (type < 0)
log_debug("Failed to parse job type value %s", v);
else