diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-08-03 17:46:48 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-08-05 10:49:46 +0200 |
commit | 604b163a31712b7d3abd5b9627e07464adc31e38 (patch) | |
tree | ecaa5b625c34f33c950dbed6a5b0496ad15d50ba /src/test/test-seccomp.c | |
parent | test-nss: modernize a bit and print path to the loaded so file (diff) | |
download | systemd-604b163a31712b7d3abd5b9627e07464adc31e38.tar.xz systemd-604b163a31712b7d3abd5b9627e07464adc31e38.zip |
test-seccomp: minor simpification
Diffstat (limited to 'src/test/test-seccomp.c')
-rw-r--r-- | src/test/test-seccomp.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c index eec2779a9e..cebf5a1080 100644 --- a/src/test/test-seccomp.c +++ b/src/test/test-seccomp.c @@ -98,9 +98,6 @@ static void test_syscall_filter_set_find(void) { } static void test_filter_sets(void) { - unsigned i; - int r; - log_info("/* %s */", __func__); if (!is_seccomp_available()) { @@ -112,7 +109,7 @@ static void test_filter_sets(void) { return; } - for (i = 0; i < _SYSCALL_FILTER_SET_MAX; i++) { + for (unsigned i = 0; i < _SYSCALL_FILTER_SET_MAX; i++) { pid_t pid; log_info("Testing %s", syscall_filter_sets[i].name); @@ -121,7 +118,7 @@ static void test_filter_sets(void) { assert_se(pid >= 0); if (pid == 0) { /* Child? */ - int fd; + int fd, r; /* If we look at the default set (or one that includes it), allow-list instead of deny-list */ if (IN_SET(i, SYSCALL_FILTER_SET_DEFAULT, SYSCALL_FILTER_SET_SYSTEM_SERVICE)) |