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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-11-30 22:21:17 +01:00
parent 62a85ee0a9
commit 652ef29887
8 changed files with 29 additions and 26 deletions
+1 -1
View File
@@ -217,7 +217,7 @@ int conf_files_cat(const char *root, const char *name) {
if (r < 0)
return log_error_errno(r, "Failed to query file list: %m");
path = path_join(strempty(root), "/etc", name);
path = path_join(root, "/etc", name);
if (!path)
return log_oom();