summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/cgroup-util.c7
-rw-r--r--src/core/cgroup.c2
-rw-r--r--src/core/scope.c2
3 files changed, 4 insertions, 7 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 218de0b376..0ebe570bb8 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -540,10 +540,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
else {
const char *dn;
- if (controller)
- dn = controller_to_dirname(controller);
- else
- dn = NULL;
+ dn = controller_to_dirname(controller);
r = join_path_legacy(dn, path, suffix, fs);
}
@@ -1913,7 +1910,7 @@ int cg_attach_many_everywhere(CGroupMask supported, const char *path, Set* pids,
}
int cg_migrate_everywhere(CGroupMask supported, const char *from, const char *to, cg_migrate_callback_t to_callback, void *userdata) {
- CGroupController c;
+ CGroupController c;
int r, unified;
if (!path_equal(from, to)) {
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index a70b4d33ae..1e78f871c7 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1076,7 +1076,7 @@ int unit_search_main_pid(Unit *u, pid_t *ret) {
}
static int unit_watch_pids_in_path(Unit *u, const char *path) {
- _cleanup_closedir_ DIR *d = NULL;
+ _cleanup_closedir_ DIR *d = NULL;
_cleanup_fclose_ FILE *f = NULL;
int ret = 0, r;
diff --git a/src/core/scope.c b/src/core/scope.c
index 44cd324f58..35cf0621be 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -138,7 +138,7 @@ static int scope_verify(Scope *s) {
return 0;
if (set_isempty(UNIT(s)->pids) &&
- !manager_is_reloading_or_reexecuting(UNIT(s)->manager) <= 0 &&
+ !manager_is_reloading_or_reexecuting(UNIT(s)->manager) &&
!unit_has_name(UNIT(s), SPECIAL_INIT_SCOPE)) {
log_unit_error(UNIT(s), "Scope has no PIDs. Refusing.");
return -EINVAL;