diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-30 11:06:24 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-30 22:21:17 +0100 |
commit | 652ef29887c2d46e363c73524f9ea47a7e99aace (patch) | |
tree | ce0f7b5396007d76376e1e2eedbc1d384e07ba58 /src/basic/conf-files.c | |
parent | 62a85ee0a9237e8c0c821e1d11425e967180164b (diff) | |
download | systemd-652ef29887c2d46e363c73524f9ea47a7e99aace.tar.gz |
path-util: allow NULLs in arguments to path_join()
This removes the need to remember to put strempty() in places, thus reducing
the likelihood of a stupid mistake.
Diffstat (limited to 'src/basic/conf-files.c')
-rw-r--r-- | src/basic/conf-files.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/conf-files.c b/src/basic/conf-files.c index 6a2a2055c7..675746a944 100644 --- a/src/basic/conf-files.c +++ b/src/basic/conf-files.c @@ -216,7 +216,7 @@ int conf_files_insert(char ***strv, const char *root, char **dirs, const char *p p2 = path_startswith(path, *dir); if (p2) { /* Our new entry has higher priority */ - t = path_join(strempty(root), path); + t = path_join(root, path); if (!t) return log_oom(); @@ -232,7 +232,7 @@ int conf_files_insert(char ***strv, const char *root, char **dirs, const char *p /* … we are not there yet, let's continue */ } - t = path_join(strempty(root), path); + t = path_join(root, path); if (!t) return log_oom(); @@ -318,7 +318,7 @@ int conf_files_list_with_replacement( if (r < 0) return log_error_errno(r, "Failed to extend config file list: %m"); - p = path_join(strempty(root), replacement); + p = path_join(root, replacement); if (!p) return log_oom(); } |