summaryrefslogtreecommitdiff
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-05-29 20:36:08 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2019-05-30 02:23:35 +0300
commitfba01a0689a98613f5ee3b1569fd9321f3fde7bd (patch)
tree359d69754de209de08203f3f709d8a0a88528c56 /kernel/bpf/arraymap.c
parentf102154d3158c8fe9713f03bd3492f9cb8409a5e (diff)
downloadlinux-fba01a0689a98613f5ee3b1569fd9321f3fde7bd.tar.xz
libbpf: use negative fd to specify missing BTF
0 is a valid FD, so it's better to initialize it to -1, as is done in other places. Also, technically, BTF type ID 0 is valid (it's a VOID type), so it's more reliable to check btf_fd, instead of btf_key_type_id, to determine if there is any BTF associated with a map. Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions