diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-17 19:07:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-17 21:18:02 +0200 |
commit | 08ac00f279f014e3b520e378e50afb8378c4649a (patch) | |
tree | 0589501fe6728b94bebb7fcf0ed3a7f40c16c689 /src/core | |
parent | sulogin-shell: Use force if SYSTEMD_SULOGIN_FORCE set (diff) | |
download | systemd-08ac00f279f014e3b520e378e50afb8378c4649a.tar.xz systemd-08ac00f279f014e3b520e378e50afb8378c4649a.zip |
job: use structured initialization
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/job.c | 11 |
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; } |