]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: constify getter APIs
authorAndrii Nakryiko <andriin@fb.com>
Mon, 17 Jun 2019 22:48:58 +0000 (15:48 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 19 Jun 2019 00:21:02 +0000 (02:21 +0200)
commit957aee098e574d4733dfc7a6c4a279934f784fde
tree7f92fea075055be977132438fb6670b5bfab6f04
parent318f1f7dc4cd173ed32224df2ed389840586f2e4
libbpf: constify getter APIs

Add const qualifiers to bpf_object/bpf_program/bpf_map arguments for
getter APIs. There is no need for them to not be const pointers.

Verified that

make -C tools/lib/bpf
make -C tools/testing/selftests/bpf
make -C tools/perf

all build without warnings.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h