diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-08-13 10:46:50 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-08-13 10:46:50 -0400 |
commit | 819fb6029dde2af3acf23b0fa25c1851b26ce102 (patch) | |
tree | 3c968bf473febd67546712e7f273e014adeb0a79 | |
parent | 37de89865378bf045e2cd33ded75a30d384bc7fa (diff) |
src/shared/cgroup-util.c: code cleanup following upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | src/shared/cgroup-util.c | 11 |
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 \ "_" |