summaryrefslogtreecommitdiffstats
path: root/src/core/exec-invoke.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-01-16 23:15:37 +0100
committerLennart Poettering <lennart@poettering.net>2024-01-17 11:32:11 +0100
commit69f3c619904f4288e6cd23ac6cdf22fa0e5b8160 (patch)
tree363df76d833a6d4f922b6ab071c39d86f90d9b22 /src/core/exec-invoke.c
parentstrv: add strv_extend_many() helper (diff)
downloadsystemd-69f3c619904f4288e6cd23ac6cdf22fa0e5b8160.tar.xz
systemd-69f3c619904f4288e6cd23ac6cdf22fa0e5b8160.zip
tree-wide: port over various pieces of code to strv_extend_many()
Diffstat (limited to 'src/core/exec-invoke.c')
-rw-r--r--src/core/exec-invoke.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c
index f39b532800..1ae766d93e 100644
--- a/src/core/exec-invoke.c
+++ b/src/core/exec-invoke.c
@@ -2811,11 +2811,10 @@ static int compile_symlinks(
* absolute, when they are processed in namespace.c they will be made relative automatically, i.e.:
* 'os-release -> .os-release-stage/os-release' is what will be created. */
if (setup_os_release_symlink) {
- r = strv_extend(&symlinks, "/run/host/.os-release-stage/os-release");
- if (r < 0)
- return r;
-
- r = strv_extend(&symlinks, "/run/host/os-release");
+ r = strv_extend_many(
+ &symlinks,
+ "/run/host/.os-release-stage/os-release",
+ "/run/host/os-release");
if (r < 0)
return r;
}