diff options
author | Tom Gundersen <teg@jklm.no> | 2015-11-11 02:31:29 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-11-11 02:31:29 +0100 |
commit | 7042fc14ff2bd30648aea6602c95d3cf6946e7be (patch) | |
tree | 9990f79bfe80bb0b9c8c6da94f62d66d5c7da97e /src/core/unit.c | |
parent | 620b7793fcbb23f6d27d42b0374d3dddb256aa40 (diff) | |
parent | be6d467c1f9219b2016d556a0a369828d463ca27 (diff) |
Merge pull request #1837 from poettering/grabbag2
variety of fixes
Diffstat (limited to 'src/core/unit.c')
-rw-r--r-- | src/core/unit.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 4def96b0c1..ccdc5191e8 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2887,7 +2887,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) { } int unit_coldplug(Unit *u) { - int r; + int r = 0, q = 0; assert(u); @@ -2898,17 +2898,16 @@ int unit_coldplug(Unit *u) { u->coldplugged = true; - if (UNIT_VTABLE(u)->coldplug) { + if (UNIT_VTABLE(u)->coldplug) r = UNIT_VTABLE(u)->coldplug(u); - if (r < 0) - return r; - } - if (u->job) { - r = job_coldplug(u->job); - if (r < 0) - return r; - } + if (u->job) + q = job_coldplug(u->job); + + if (r < 0) + return r; + if (q < 0) + return q; return 0; } |