mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
core: simplify skip_seccomp_unavailable() a bit
Let's prefer early-exit over deep-indented if blocks. Not behavioural change.
This commit is contained in:
parent
ec2ebfd524
commit
f673b62df6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user