From: Lennart Poettering Date: Tue, 27 Jun 2023 09:19:31 +0000 (+0200) Subject: execute: shorten code by making use of laccess() return code properly X-Git-Tag: v254-rc1~84^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b93d24e07d903d5860f20ec97849760091348d98;p=thirdparty%2Fsystemd.git execute: shorten code by making use of laccess() return code properly --- diff --git a/src/core/execute.c b/src/core/execute.c index c3eeaa486b5..652ff444221 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -2615,7 +2615,7 @@ static int setup_exec_directory( goto fail; if (is_dir(p, false) > 0 && - (laccess(pp, F_OK) < 0 && errno == ENOENT)) { + (laccess(pp, F_OK) == -ENOENT)) { /* Hmm, the private directory doesn't exist yet, but the normal one exists? If so, move * it over. Most likely the service has been upgraded from one that didn't use