chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab72df6
)
util-lib: kill duplicate slashes in lookup paths
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Thu, 23 Nov 2017 12:02:21 +0000
(13:02 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Thu, 23 Nov 2017 12:02:21 +0000
(13:02 +0100)
Since we're munging the array anyway, we can make the output a bit
nicer too.
src/basic/path-util.c
patch
|
blob
|
history
diff --git
a/src/basic/path-util.c
b/src/basic/path-util.c
index fa17fc0348cfa9189de1a6e31df16b6f75596940..83751716a48a592f95982490a32cfa3729164d6b 100644
(file)
--- 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;