summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-13 13:12:32 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-10-29 10:18:39 +0100
commitbeed80d1d2042ca36b0555725a226506d77a62b1 (patch)
tree5e7a34206f8c5981402b9e03aeac0ac90ea23898 /src
parent2eae0cc84c4492a3fe93d453c4ff5a7c6e633f26 (diff)
exec-util: errors are reported by non-zero, not negative by putenv()
(cherry picked from commit 8f7329ac276306dfaf6cc47920f3c5e71a0ab586)
Diffstat (limited to 'src')
-rw-r--r--src/basic/exec-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/exec-util.c b/src/basic/exec-util.c
index 1abcdb56a..1d45924e4 100644
--- a/src/basic/exec-util.c
+++ b/src/basic/exec-util.c
@@ -102,7 +102,7 @@ static int do_execute(
alarm(DIV_ROUND_UP(timeout, USEC_PER_SEC));
STRV_FOREACH(e, envp)
- if (putenv(*e) < 0)
+ if (putenv(*e) != 0)
return log_error_errno(errno, "Failed to set environment variable: %m");
STRV_FOREACH(path, paths) {