diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-04-15 22:16:40 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-04-21 09:52:08 -0400 |
commit | dbb9401dba0bd5157d021e695a47bf52b2d74a2d (patch) | |
tree | 1e1702058f666fdff25227e3366560918e6291ea /src/shared/cgroup-util.c | |
parent | 6d6c604ac8ac777dde0eeb58745ee6e76e2ea43d (diff) |
condense assignment and path_kill_slashes calls
Diffstat (limited to 'src/shared/cgroup-util.c')
-rw-r--r-- | src/shared/cgroup-util.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 9d50890adc..139888c4a1 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -472,9 +472,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; } @@ -957,8 +955,7 @@ int cg_split_spec(const char *spec, char **controller, char **path) { if (!t) return -ENOMEM; - path_kill_slashes(t); - *path = t; + *path = path_kill_slashes(t); } if (controller) @@ -1048,8 +1045,7 @@ int cg_mangle_path(const char *path, char **result) { if (!t) return -ENOMEM; - path_kill_slashes(t); - *result = t; + *result = path_kill_slashes(t); return 0; } |