summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-10 20:42:58 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-10 21:03:49 +0100
commit9ff1a6f1d61d4569920d5b75c88cf1c2ad9adaae (patch)
treee96308b84a66e5d1bebac24ac5d98c8bcd627692 /src/core/manager.c
parent5a6158b6412100672e1cbddb22efdcc5101fed7f (diff)
core: change type of distribute_fds() prototype to return void
We can't handle errors of thisc all sanely anyway, and we never actually return any errors from the unit type that implements the call. Hence, let's make this void, in order to simplify things.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index dbe11c2b4d..f712ac29dc 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1094,10 +1094,9 @@ fail:
}
-static int manager_distribute_fds(Manager *m, FDSet *fds) {
- Unit *u;
+static void manager_distribute_fds(Manager *m, FDSet *fds) {
Iterator i;
- int r;
+ Unit *u;
assert(m);
@@ -1106,14 +1105,11 @@ static int manager_distribute_fds(Manager *m, FDSet *fds) {
if (fdset_size(fds) <= 0)
break;
- if (UNIT_VTABLE(u)->distribute_fds) {
- r = UNIT_VTABLE(u)->distribute_fds(u, fds);
- if (r < 0)
- return r;
- }
- }
+ if (!UNIT_VTABLE(u)->distribute_fds)
+ continue;
- return 0;
+ UNIT_VTABLE(u)->distribute_fds(u, fds);
+ }
}
int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
@@ -1157,11 +1153,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
* useful to allow container managers to pass some file
* descriptors to us pre-initialized. This enables
* socket-based activation of entire containers. */
- if (fdset_size(fds) > 0) {
- q = manager_distribute_fds(m, fds);
- if (q < 0 && r == 0)
- r = q;
- }
+ manager_distribute_fds(m, fds);
/* We might have deserialized the notify fd, but if we didn't
* then let's create the bus now */