diff options
Diffstat (limited to 'src/gen_bpf.c')
-rw-r--r-- | src/gen_bpf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gen_bpf.c b/src/gen_bpf.c index 5f88972..90c38cc 100644 --- a/src/gen_bpf.c +++ b/src/gen_bpf.c @@ -1342,6 +1342,9 @@ static int _get_bintree_levels(unsigned int syscall_cnt) { unsigned int i = 2, max_level = SYSCALLS_PER_NODE * 2; + if (syscall_cnt == 0) + return 0; + while (max_level < syscall_cnt) { max_level <<= 1; i++; |