diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-11-17 20:28:24 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-11-18 23:13:38 +0100 |
commit | f80e16b614f303b520465b7c704ff89fab800f2f (patch) | |
tree | 34a05f070a2f0eaf257a083fa3c432cca52fdf0e /tools/lib | |
parent | selftests/bpf: Skip spin lock failure test on s390x (diff) | |
download | linux-f80e16b614f303b520465b7c704ff89fab800f2f.tar.xz linux-f80e16b614f303b520465b7c704ff89fab800f2f.zip |
libbpf: Ignore hashmap__find() result explicitly in btf_dump
Coverity is reporting that btf_dump_name_dups() doesn't check return
result of hashmap__find() call. This is intentional, so make it explicit
with (void) cast.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20221117192824.4093553-1-andrii@kernel.org
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/bpf/btf_dump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c index e9f849d82124..deb2bc9a0a7b 100644 --- a/tools/lib/bpf/btf_dump.c +++ b/tools/lib/bpf/btf_dump.c @@ -1543,7 +1543,7 @@ static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map, if (!new_name) return 1; - hashmap__find(name_map, orig_name, &dup_cnt); + (void)hashmap__find(name_map, orig_name, &dup_cnt); dup_cnt++; err = hashmap__set(name_map, new_name, dup_cnt, &old_name, NULL); |