From: Lennart Poettering Date: Sat, 13 Oct 2018 11:12:32 +0000 (+0200) Subject: exec-util: errors are reported by non-zero, not negative by putenv() X-Git-Tag: v240~512^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f7329ac276306dfaf6cc47920f3c5e71a0ab586;p=thirdparty%2Fsystemd.git exec-util: errors are reported by non-zero, not negative by putenv() --- diff --git a/src/basic/exec-util.c b/src/basic/exec-util.c index 32c64184822..a6c020b0f8c 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) {