Merge pull request #12836 from yuwata/tree-wide-replace-strjoin

tree-wide: replace strjoin() with path_join()
This commit is contained in:
Lennart Poettering
2019-06-22 20:02:46 +02:00
committed by GitHub
44 changed files with 95 additions and 126 deletions
+2 -5
View File
@@ -68,10 +68,7 @@ char *path_make_absolute(const char *p, const char *prefix) {
if (path_is_absolute(p) || isempty(prefix))
return strdup(p);
if (endswith(prefix, "/"))
return strjoin(prefix, p);
else
return strjoin(prefix, "/", p);
return path_join(prefix, p);
}
int safe_getcwd(char **ret) {
@@ -581,7 +578,7 @@ int find_binary(const char *name, char **ret) {
if (!path_is_absolute(element))
continue;
j = strjoin(element, "/", name);
j = path_join(element, name);
if (!j)
return -ENOMEM;