helper/seccomp: do not call F_println if not verbose

This (slightly) improves performance.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-01-25 13:19:38 +09:00
parent 163f15e93f
commit 7b96cd6ded
4 changed files with 17 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ struct f_syscall_act {
#define LEN(arr) (sizeof(arr) / sizeof((arr)[0]))
#define SECCOMP_RULESET_ADD(ruleset) do { \
F_println("adding seccomp ruleset \"" #ruleset "\""); \
if (opts & F_VERBOSE) F_println("adding seccomp ruleset \"" #ruleset "\""); \
for (int i = 0; i < LEN(ruleset); i++) { \
assert(ruleset[i].m_errno == EPERM || ruleset[i].m_errno == ENOSYS); \
\