core/bpf: lsm_bpf_supported() returns a boolean

The code was corret, but confusing, because it was treating the int
as a boolean.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-05-17 10:16:27 +02:00
parent 9b7c8253f9
commit 389db516df
3 changed files with 13 additions and 14 deletions
+1 -2
View File
@@ -78,8 +78,7 @@ int main(int argc, char *argv[]) {
if (!can_memlock())
return log_tests_skipped("Can't use mlock()");
r = lsm_bpf_supported();
if (r <= 0)
if (!lsm_bpf_supported())
return log_tests_skipped("LSM BPF hooks are not supported");
r = enter_cgroup_subroot(NULL);