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/slice.c | |
parent | 620b7793fcbb23f6d27d42b0374d3dddb256aa40 (diff) | |
parent | be6d467c1f9219b2016d556a0a369828d463ca27 (diff) |
Merge pull request #1837 from poettering/grabbag2
variety of fixes
Diffstat (limited to 'src/core/slice.c')
-rw-r--r-- | src/core/slice.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/slice.c b/src/core/slice.c index 4602144150..2aa3fbf8be 100644 --- a/src/core/slice.c +++ b/src/core/slice.c @@ -255,7 +255,7 @@ _pure_ static const char *slice_sub_state_to_string(Unit *u) { return slice_state_to_string(SLICE(u)->state); } -static int slice_enumerate(Manager *m) { +static void slice_enumerate(Manager *m) { Unit *u; int r; @@ -264,13 +264,16 @@ static int slice_enumerate(Manager *m) { u = manager_get_unit(m, SPECIAL_ROOT_SLICE); if (!u) { u = unit_new(m, sizeof(Slice)); - if (!u) - return log_oom(); + if (!u) { + log_oom(); + return; + } r = unit_add_name(u, SPECIAL_ROOT_SLICE); if (r < 0) { unit_free(u); - return log_error_errno(r, "Failed to add -.slice name"); + log_error_errno(r, "Failed to add -.slice name"); + return; } } @@ -288,8 +291,6 @@ static int slice_enumerate(Manager *m) { unit_add_to_load_queue(u); unit_add_to_dbus_queue(u); - - return 0; } const UnitVTable slice_vtable = { |