diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-23 13:02:21 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-12-06 10:18:27 +0100 |
commit | 32a8f700a4acd601c6bac89e871d2e9e145f4adf (patch) | |
tree | f3fd03c0a59bbe6d3c4d5d62bc5003ae328c4f3f /src/basic/path-util.c | |
parent | ca4adeb7913712f3f676d9e1e5b5131ab9d6664e (diff) | |
download | systemd-32a8f700a4acd601c6bac89e871d2e9e145f4adf.tar.gz |
util-lib: kill duplicate slashes in lookup paths
Since we're munging the array anyway, we can make the output a bit
nicer too.
Diffstat (limited to 'src/basic/path-util.c')
-rw-r--r-- | src/basic/path-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 3bde1d1e01..efeca13594 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -223,8 +223,8 @@ int path_strv_make_absolute_cwd(char **l) { if (r < 0) return r; - free(*s); - *s = t; + path_kill_slashes(t); + free_and_replace(*s, t); } return 0; |