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
+3 -3
View File
@@ -425,7 +425,7 @@ int make_filesystem(
"-T", "default",
node);
if (root && strv_extend_strv(&argv, STRV_MAKE("-d", root), false) < 0)
if (root && strv_extend_many(&argv, "-d", root) < 0)
return log_oom();
if (quiet && strv_extend(&argv, "-q") < 0)
@@ -450,7 +450,7 @@ int make_filesystem(
if (!discard && strv_extend(&argv, "--nodiscard") < 0)
return log_oom();
if (root && strv_extend_strv(&argv, STRV_MAKE("-r", root), false) < 0)
if (root && strv_extend_many(&argv, "-r", root) < 0)
return log_oom();
if (quiet && strv_extend(&argv, "-q") < 0)
@@ -514,7 +514,7 @@ int make_filesystem(
if (!protofile_with_opt)
return -ENOMEM;
if (strv_extend_strv(&argv, STRV_MAKE("-p", protofile_with_opt), false) < 0)
if (strv_extend_many(&argv, "-p", protofile_with_opt) < 0)
return log_oom();
}