exec-util: errors are reported by non-zero, not negative by putenv()

This commit is contained in:
Lennart Poettering
2018-10-18 16:40:12 +02:00
parent b6b180b77b
commit 8f7329ac27
+1 -1
View File
@@ -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) {