From: Lennart Poettering Date: Wed, 17 Oct 2018 17:07:15 +0000 (+0200) Subject: job: use structured initialization X-Git-Tag: v240~528^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08ac00f279f014e3b520e378e50afb8378c4649a;p=thirdparty%2Fsystemd.git job: use structured initialization --- diff --git a/src/core/job.c b/src/core/job.c index 6b17cc1d6f6..d560453bf89 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; }