summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/cgroup-util.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index af6ce959c1..34582a7eb6 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -119,12 +119,12 @@ int cg_kill(const char *controller, const char *path, int sig, bool sigcont, boo
if (kill(pid, sig) < 0) {
if (ret >= 0 && errno != ESRCH)
ret = -errno;
- } else if (ret == 0) {
-
+ } else {
if (sigcont)
kill(pid, SIGCONT);
- ret = 1;
+ if (ret == 0)
+ ret = 1;
}
done = false;
@@ -190,9 +190,7 @@ static int join_path(const char *controller, const char *path, const char *suffi
if (!t)
return -ENOMEM;
- path_kill_slashes(t);
-
- *fs = t;
+ *fs = path_kill_slashes(t);
return 0;
}
@@ -221,7 +219,6 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
return join_path(p, path, suffix, fs);
}
-
#define CONTROLLER_VALID \
DIGITS LETTERS \
"_"