summaryrefslogtreecommitdiffstats
path: root/src/shared/exec-util.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/shared/exec-util.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/shared/exec-util.c b/src/shared/exec-util.c
index 6355ce8ce4..1557086079 100644
--- a/src/shared/exec-util.c
+++ b/src/shared/exec-util.c
@@ -278,18 +278,12 @@ static int gather_environment_generate(int fd, void *arg) {
return r;
STRV_FOREACH_PAIR(x, y, new) {
- char *p;
-
if (!env_name_is_valid(*x)) {
log_warning("Invalid variable assignment \"%s=...\", ignoring.", *x);
continue;
}
- p = strjoin(*x, "=", *y);
- if (!p)
- return -ENOMEM;
-
- r = strv_env_replace(env, p);
+ r = strv_env_assign(env, *x, *y);
if (r < 0)
return r;
@@ -297,7 +291,7 @@ static int gather_environment_generate(int fd, void *arg) {
return -errno;
}
- return r;
+ return 0;
}
static int gather_environment_collect(int fd, void *arg) {