diff options
author | 2017-11-23 13:02:21 +0100 | |
---|---|---|
committer | 2017-12-06 10:18:27 +0100 | |
commit | 32a8f700a4acd601c6bac89e871d2e9e145f4adf (patch) | |
tree | f3fd03c0a59bbe6d3c4d5d62bc5003ae328c4f3f | |
parent | shared: export xdg_user_dirs() and xdg_user_*_dir() (diff) | |
download | systemd-32a8f700a4acd601c6bac89e871d2e9e145f4adf.tar.gz systemd-32a8f700a4acd601c6bac89e871d2e9e145f4adf.tar.bz2 systemd-32a8f700a4acd601c6bac89e871d2e9e145f4adf.zip |
util-lib: kill duplicate slashes in lookup paths
Since we're munging the array anyway, we can make the output a bit
nicer too.
-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 3bde1d1e0..efeca1359 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; |