]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: btf: Avoid variable length array
authorMartin KaFai Lau <kafai@fb.com>
Wed, 23 May 2018 18:32:36 +0000 (11:32 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 24 May 2018 07:15:11 +0000 (09:15 +0200)
commitb6f28c29fdc0f52d72a7364d091eec3424290e9a
tree438d5921310c11392d0e4995d1f3e7b90fc0203a
parentf24835d26924fa6a1e55caeb98b9a431120beee6
bpf: btf: Avoid variable length array

Sparse warning:
kernel/bpf/btf.c:1985:34: warning: Variable length array is used.

This patch directly uses ARRAY_SIZE().

Fixes: ad975d5aa77b ("bpf: btf: Change how section is supported in btf_header")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/btf.c