tree-wide: port over various pieces of code to strv_extend_many()

This commit is contained in:
Lennart Poettering
2024-01-17 11:32:11 +01:00
parent 80f1e209a5
commit 69f3c61990
12 changed files with 72 additions and 101 deletions
+4 -5
View File
@@ -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();
}