summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-17 19:07:15 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-17 21:18:02 +0200
commit08ac00f279f014e3b520e378e50afb8378c4649a (patch)
tree0589501fe6728b94bebb7fcf0ed3a7f40c16c689 /src/core
parentsulogin-shell: Use force if SYSTEMD_SULOGIN_FORCE set (diff)
downloadsystemd-08ac00f279f014e3b520e378e50afb8378c4649a.tar.xz
systemd-08ac00f279f014e3b520e378e50afb8378c4649a.zip
job: use structured initialization
Diffstat (limited to 'src/core')
-rw-r--r--src/core/job.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/job.c b/src/core/job.c
index 6b17cc1d6f..d560453bf8 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -31,14 +31,15 @@ Job* job_new_raw(Unit *unit) {
assert(unit);
- j = new0(Job, 1);
+ j = new(Job, 1);
if (!j)
return NULL;
- j->manager = unit->manager;
- j->unit = unit;
- j->type = _JOB_TYPE_INVALID;
- j->reloaded = false;
+ *j = (Job) {
+ .manager = unit->manager,
+ .unit = unit,
+ .type = _JOB_TYPE_INVALID,
+ };
return j;
}