From: Lennart Poettering Date: Thu, 14 Mar 2019 16:01:46 +0000 (+0100) Subject: execute: remove one redundant comparison check X-Git-Tag: archive/raspbian/241-7_deb10u3+rpi1^2~18 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=001d3bdf103dc8d9ebfd9cc662dd6d8e69b8f05f;p=systemd.git execute: remove one redundant comparison check (cherry picked from commit d484580ca6f0e79abe6f3f5c677323a22d9e22d7) Gbp-Pq: Name execute-remove-one-redundant-comparison-check.patch --- diff --git a/src/core/execute.c b/src/core/execute.c index f2a4c545..5486e374 100644 --- 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;