* [PATCH bpf-next] libbpf: ignore hashmap__find() result explicitly in btf_dump
@ 2022-11-17 19:28 Andrii Nakryiko
2022-11-18 22:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Andrii Nakryiko @ 2022-11-17 19:28 UTC (permalink / raw)
To: bpf, ast, daniel; +Cc: andrii, kernel-team
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>
---
tools/lib/bpf/btf_dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] libbpf: ignore hashmap__find() result explicitly in btf_dump
2022-11-17 19:28 [PATCH bpf-next] libbpf: ignore hashmap__find() result explicitly in btf_dump Andrii Nakryiko
@ 2022-11-18 22:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-18 22:20 UTC (permalink / raw)
To: Andrii Nakryiko; +Cc: bpf, ast, daniel, kernel-team
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Thu, 17 Nov 2022 11:28:24 -0800 you wrote:
> 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>
> ---
> tools/lib/bpf/btf_dump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [bpf-next] libbpf: ignore hashmap__find() result explicitly in btf_dump
https://git.kernel.org/bpf/bpf-next/c/f80e16b614f3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-18 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-17 19:28 [PATCH bpf-next] libbpf: ignore hashmap__find() result explicitly in btf_dump Andrii Nakryiko
2022-11-18 22:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox