]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/load-fragment: use unit_path_printf where appropriate
authorMike Yuan <me@yhndnzj.com>
Tue, 9 Jan 2024 16:05:49 +0000 (00:05 +0800)
committerMike Yuan <me@yhndnzj.com>
Tue, 9 Jan 2024 18:07:17 +0000 (02:07 +0800)
src/core/load-fragment.c

index ee11c36d7d4f39c65d0ba433481648c0f7601bd4..5bfb8a6d1e45b53bc261b88f05e2b8c898d07126 100644 (file)
@@ -2697,7 +2697,7 @@ int config_parse_unit_env_file(const char *unit,
                 return 0;
         }
 
-        r = unit_full_printf_full(u, rvalue, PATH_MAX, &n);
+        r = unit_path_printf(u, rvalue, &n);
         if (r < 0) {
                 log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to resolve unit specifiers in '%s', ignoring: %m", rvalue);
                 return 0;
@@ -5268,7 +5268,7 @@ int config_parse_bind_paths(
                 if (r == 0)
                         break;
 
-                r = unit_full_printf_full(u, source, PATH_MAX, &sresolved);
+                r = unit_path_printf(u, source, &sresolved);
                 if (r < 0) {
                         log_syntax(unit, LOG_WARNING, filename, line, r,
                                    "Failed to resolve unit specifiers in \"%s\", ignoring: %m", source);