projects
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3167707
)
execute: remove one redundant comparison check
author
Lennart Poettering
<lennart@poettering.net>
Thu, 14 Mar 2019 16:01:46 +0000
(17:01 +0100)
committer
Michael Biebl
<biebl@debian.org>
Fri, 29 Jan 2021 14:16:06 +0000
(14:16 +0000)
(cherry picked from commit
d484580ca6f0e79abe6f3f5c677323a22d9e22d7
)
Gbp-Pq: Name execute-remove-one-redundant-comparison-check.patch
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index f2a4c545b04f0296f6224b5e5f8f7da54b7dfe1b..5486e37439aeb4dae7b60bd4dd1a6694a402c9ec 100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-2158,11
+2158,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;