summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-23 13:02:21 +0100
committerSven Eden <yamakuzure@gmx.net>2017-11-23 13:02:21 +0100
commitfecdb9416d94efbbc947cd8ee376d78d33d090c4 (patch)
tree9209c3ba4e76dcb26c82eb025a5c81d0a8a94032 /src
parentab72df649f114d27cb6c7cd7c8c41cf755d62699 (diff)
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')
-rw-r--r--src/basic/path-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index fa17fc034..83751716a 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -225,8 +225,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;