projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40cd2ec
)
execute: remove one redundant comparison check
author
Lennart Poettering
<lennart@poettering.net>
Thu, 14 Mar 2019 16:01:46 +0000
(17:01 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 19 Mar 2019 15:52:28 +0000
(16:52 +0100)
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index
0fe084f
..
2012cd5
100644
(file)
--- 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;