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
@@ -5975,7 +5975,7 @@ static int enable_sysv_units(const char *verb, char **args) {
if (found_native && streq(verb, "is-enabled"))
continue;
p = path_join(strempty(arg_root), SYSTEM_SYSVINIT_PATH, name);
p = path_join(arg_root, SYSTEM_SYSVINIT_PATH, name);
if (!p)
return log_oom();