summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-21 20:03:51 +0200
committerLennart Poettering <lennart@poettering.net>2016-10-24 17:29:51 +0200
commitf673b62df67dfa67ddfa4f5a72d78ea3c002278f (patch)
tree1c40c578ae91bc3ed8da6baa97a16abea6d6f7ed /src/core/execute.c
parentec2ebfd524447caf14e63b49b3f63117b93c7c78 (diff)
core: simplify skip_seccomp_unavailable() a bit
Let's prefer early-exit over deep-indented if blocks. Not behavioural change.
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 53356c3c06..b69297241b 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1185,13 +1185,14 @@ static void rename_process_from_path(const char *path) {
#ifdef HAVE_SECCOMP
static bool skip_seccomp_unavailable(const Unit* u, const char* msg) {
- if (!is_seccomp_available()) {
- log_open();
- log_unit_debug(u, "SECCOMP features not detected in the kernel, skipping %s", msg);
- log_close();
- return true;
- }
- return false;
+
+ if (is_seccomp_available())
+ return false;
+
+ log_open();
+ log_unit_debug(u, "SECCOMP features not detected in the kernel, skipping %s", msg);
+ log_close();
+ return true;
}
static int apply_seccomp(const Unit* u, const ExecContext *c) {