]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: use strempty()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 18 Dec 2023 16:25:10 +0000 (17:25 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 18 Dec 2023 16:25:10 +0000 (17:25 +0100)
src/analyze/analyze-verify-util.c

index 6fbd6fa54c37d9b09feceb8efc6fc614fdec882d..0202db77135920ddcc6bb62a8335bfd61573d439 100644 (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);