From 5ffb9efa58b96b7dcfa8059fead344f32d34d166 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 20 Dec 2023 15:43:10 +0000 Subject: env_mergen() should not fail, by policy Signed-off-by: Laurent Bercot --- src/libstddjb/child_spawn.c | 2 +- src/libstddjb/child_spawn3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstddjb') diff --git a/src/libstddjb/child_spawn.c b/src/libstddjb/child_spawn.c index fb5be27..164f1b2 100644 --- a/src/libstddjb/child_spawn.c +++ b/src/libstddjb/child_spawn.c @@ -36,7 +36,7 @@ pid_t child_spawn (char const *prog, char const *const *argv, char const *const if (i+1 < n) modifs[m++] = ',' ; } modifs[m++] = 0 ; - if (!env_mergen(newenv, envlen + 2, envp, envlen, modifs, m, 1)) goto errpi ; + env_mergen(newenv, envlen + 2, envp, envlen, modifs, m, 1) ; if (n) fa[0].x.fd2[1] = p[0][1] ; if (n >= 2) fa[1].x.fd2[1] = p[1][0] ; pid = cspawn(prog, argv, newenv, CSPAWN_FLAGS_SIGBLOCKNONE, fa, n < 2 ? n : 2) ; diff --git a/src/libstddjb/child_spawn3.c b/src/libstddjb/child_spawn3.c index 932e5ab..75551d2 100644 --- a/src/libstddjb/child_spawn3.c +++ b/src/libstddjb/child_spawn3.c @@ -29,7 +29,7 @@ pid_t child_spawn3 (char const *prog, char const *const *argv, char const *const char const *newenv[envlen + 2] ; m += uint_fmt(modifs + sizeof(SKALIBS_CHILD_SPAWN_FDS_ENVVAR), p[2][1]) ; modifs[m++] = 0 ; - if (!env_mergen(newenv, envlen + 2, envp, envlen, modifs, m, 1)) goto err ; + env_mergen(newenv, envlen + 2, envp, envlen, modifs, m, 1) ; pid = cspawn(prog, argv, newenv, CSPAWN_FLAGS_SIGBLOCKNONE, fa, 2) ; if (!pid) goto err ; } -- cgit v1.2.3