diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-03-14 17:01:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-03-19 16:52:28 +0100 |
commit | d484580ca6f0e79abe6f3f5c677323a22d9e22d7 (patch) | |
tree | d971872261fa961e941d2da583bea501d6a581c9 /src/core/execute.c | |
parent | 40cd2ecc26b776ef085fd0fd29e8e96f6422a0d3 (diff) | |
download | systemd-d484580ca6f0e79abe6f3f5c677323a22d9e22d7.tar.gz |
execute: remove one redundant comparison check
Diffstat (limited to 'src/core/execute.c')
-rw-r--r-- | src/core/execute.c | 7 |
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; |