projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97c11d6
)
libbpf: Ignore hashmap__find() result explicitly in btf_dump
author
Andrii Nakryiko
<andrii@kernel.org>
Thu, 17 Nov 2022 19:28:24 +0000
(11:28 -0800)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Fri, 18 Nov 2022 22:13:38 +0000
(23:13 +0100)
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
tools/lib/bpf/btf_dump.c
patch
|
blob
|
history
diff --git
a/tools/lib/bpf/btf_dump.c
b/tools/lib/bpf/btf_dump.c
index e9f849d82124d9df94d4312a826cfca04ca21a78..deb2bc9a0a7b0504a25cd728b936068d79f4e261 100644
(file)
--- 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);