]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
execute: shorten code by making use of laccess() return code properly
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Jun 2023 09:19:31 +0000 (11:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 28 Jun 2023 20:07:38 +0000 (22:07 +0200)
src/core/execute.c

index c3eeaa486b5a49d34cdf9eb6011214bd1177e9d8..652ff444221ba55ab48f8e68a93baea55a8ef698 100644 (file)
@@ -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