From: Zbigniew Jędrzejewski-Szmek Date: Thu, 23 Nov 2017 12:02:21 +0000 (+0100) Subject: util-lib: kill duplicate slashes in lookup paths X-Git-Tag: v236~54^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32a8f700a4acd601c6bac89e871d2e9e145f4adf;p=thirdparty%2Fsystemd.git util-lib: kill duplicate slashes in lookup paths Since we're munging the array anyway, we can make the output a bit nicer too. --- diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 3bde1d1e01b..efeca13594d 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;