analyze: use strempty()

This commit is contained in:
Frantisek Sumsal
2023-12-18 17:25:10 +01:00
parent 31dcc1b4ba
commit 3c4d0ec940
+1 -1
View File
@@ -152,7 +152,7 @@ int verify_set_unit_path(char **filenames) {
* Treat explicit empty path to mean that nothing should be appended. */
old = getenv("SYSTEMD_UNIT_PATH");
if (!streq_ptr(old, "") &&
!strextend_with_separator(&joined, ":", old ?: ""))
!strextend_with_separator(&joined, ":", strempty(old)))
return -ENOMEM;
assert_se(set_unit_path(joined) >= 0);