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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user