Skip to content
Commit d1313e01 authored by Sahid Orentino Ferdjaoui's avatar Sahid Orentino Ferdjaoui Committed by Alexei Starovoitov
Browse files

bpftool: clean-up usage of libbpf_get_error()



bpftool is now totally compliant with libbpf 1.0 mode and is not
expected to be compiled with pre-1.0, let's clean-up the usage of
libbpf_get_error().

The changes stay aligned with returned errors always negative.

- In tools/bpf/bpftool/btf.c This fixes an uninitialized local
variable `err` in function do_dump() because it may now be returned
without having been set.
- This also removes the checks on NULL pointers before calling
btf__free() because that function already does the check.

Signed-off-by: default avatarSahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Link: https://lore.kernel.org/r/20221120112515.38165-5-sahid.ferdjaoui@industrialdiscipline.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent d2973ffd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment