diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-13 13:12:32 +0200 |
---|---|---|
committer | Sven Eden <sven.eden@prydeworx.com> | 2018-10-29 10:18:39 +0100 |
commit | beed80d1d2042ca36b0555725a226506d77a62b1 (patch) | |
tree | 5e7a34206f8c5981402b9e03aeac0ac90ea23898 | |
parent | 2eae0cc84c4492a3fe93d453c4ff5a7c6e633f26 (diff) |
exec-util: errors are reported by non-zero, not negative by putenv()
(cherry picked from commit 8f7329ac276306dfaf6cc47920f3c5e71a0ab586)
-rw-r--r-- | src/basic/exec-util.c | 2 |
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) { |