mirror of
https://github.com/netdata/libbpf.git
synced 2026-11-08 20:00:43 +08:00
libbpf: Remove several dead assignments
Clang Static Analyzer (scan-build) reports several dead assignments in libbpf where the assigned value is unconditionally overridden by another value before it is read. Remove these assignments. Signed-off-by: Viktor Malik <vmalik@redhat.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/5503d18966583e55158471ebbb2f67374b11bf5e.1677658777.git.vmalik@redhat.com Signed-off-by: Daniel Müller <deso@posteo.net>
This commit is contained in:
1 parent
4c75268933
commit
3706449b1b
3 files changed
-6
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user