diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-03-01 11:13:11 -0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-03-01 11:13:11 -0800 |
commit | 07e2193f106d61332e549b4e31d95da38261e718 (patch) | |
tree | f3a9fe2000347bf76596a2174ca57fc933e5c023 /tools/lib/bpf/libbpf.c | |
parent | be35f4af719c94df137cd611bf497d658eb3adc2 (diff) | |
parent | 4672129127eed0d16ab1b4b70b4e49014e49e8bb (diff) |
Merge branch 'libbpf: fix several issues reported by static analysers'
Viktor Malik says:
====================
Fixing several issues reported by Coverity and Clang Static Analyzer
(scan-build) for libbpf, mostly removing unnecessary symbols and
assignments.
No functional changes should be introduced.
====================
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
-rw-r--r-- | tools/lib/bpf/libbpf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 05c4db355f28..ba9e7e2b7951 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -798,7 +798,6 @@ bpf_object__add_programs(struct bpf_object *obj, Elf_Data *sec_data, progs = obj->programs; nr_progs = obj->nr_programs; nr_syms = symbols->d_size / sizeof(Elf64_Sym); - sec_off = 0; for (i = 0; i < nr_syms; i++) { sym = elf_sym_by_idx(obj, i); @@ -2615,7 +2614,7 @@ static int bpf_object__init_maps(struct bpf_object *obj, strict = !OPTS_GET(opts, relaxed_maps, false); pin_root_path = OPTS_GET(opts, pin_root_path, NULL); - err = err ?: bpf_object__init_user_btf_maps(obj, strict, pin_root_path); + err = bpf_object__init_user_btf_maps(obj, strict, pin_root_path); err = err ?: bpf_object__init_global_data_maps(obj); err = err ?: bpf_object__init_kconfig_map(obj); err = err ?: bpf_object__init_struct_ops_maps(obj); |