]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commita2889a4c2d3aefdf6f2a636fa1531243653a7633
tree438d5921310c11392d0e4995d1f3e7b90fc0203a
parenta1c818109cc8126cf20523692ca29f1eae3172eb
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: f80442a4cd18 ("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