tree-wide: Remove strv_from_stdarg_alloca()

It's trivial to replace all uses of this function with STRV_MAKE()
and strv_new_ap() so let's get rid of this variant.
This commit is contained in:
Daan De Meyer
2025-05-06 17:40:01 +02:00
parent c0239e5f11
commit 38c9ca5380
26 changed files with 89 additions and 147 deletions
+4 -5
View File
@@ -561,10 +561,10 @@ int shall_fork_agent(void) {
return true;
}
int _fork_agent(const char *name, const int except[], size_t n_except, pid_t *ret_pid, const char *path, ...) {
int _fork_agent(const char *name, char * const *argv, const int except[], size_t n_except, pid_t *ret_pid) {
int r;
assert(path);
assert(!strv_isempty(argv));
/* Spawns a temporary TTY agent, making sure it goes away when we go away */
@@ -617,8 +617,7 @@ int _fork_agent(const char *name, const int except[], size_t n_except, pid_t *re
}
/* Count arguments */
char **l = strv_from_stdarg_alloca(path);
execv(path, l);
log_error_errno(errno, "Failed to execute %s: %m", path);
execv(argv[0], argv);
log_error_errno(errno, "Failed to execute %s: %m", argv[0]);
_exit(EXIT_FAILURE);
}