summaryrefslogtreecommitdiffstats
path: root/src/kernel-install
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/kernel-install
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/kernel-install')
-rw-r--r--src/kernel-install/kernel-install.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/kernel-install/kernel-install.c b/src/kernel-install/kernel-install.c
index 2fbaecf596..2523d43944 100644
--- a/src/kernel-install/kernel-install.c
+++ b/src/kernel-install/kernel-install.c
@@ -978,11 +978,10 @@ static int context_build_arguments(Context *c) {
return log_oom();
} else if (c->action == ACTION_INSPECT) {
- r = strv_extend(&a, c->kernel ?: "[KERNEL_IMAGE]");
- if (r < 0)
- return log_oom();
-
- r = strv_extend(&a, "[INITRD...]");
+ r = strv_extend_many(
+ &a,
+ c->kernel ?: "[KERNEL_IMAGE]",
+ "[INITRD...]");
if (r < 0)
return log_oom();
}