summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-03-14 17:01:46 +0100
committerLennart Poettering <lennart@poettering.net>2019-03-19 16:52:28 +0100
commitd484580ca6f0e79abe6f3f5c677323a22d9e22d7 (patch)
treed971872261fa961e941d2da583bea501d6a581c9 /src/core/execute.c
parent40cd2ecc26b776ef085fd0fd29e8e96f6422a0d3 (diff)
downloadsystemd-d484580ca6f0e79abe6f3f5c677323a22d9e22d7.tar.gz
execute: remove one redundant comparison check
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 0fe084f211..2012cd596a 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2164,11 +2164,12 @@ static int setup_exec_directory(
}
} else {
r = mkdir_label(p, context->directories[type].mode);
- if (r < 0 && r != -EEXIST)
- goto fail;
- if (r == -EEXIST) {
+ if (r < 0) {
struct stat st;
+ if (r != -EEXIST)
+ goto fail;
+
if (stat(p, &st) < 0) {
r = -errno;
goto fail;