projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1087da
)
bpftool: Cast variable `var` to long long
author
Luo Yifan
<luoyifan@cmss.chinamobile.com>
Tue, 12 Nov 2024 07:37:01 +0000
(15:37 +0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Wed, 13 Nov 2024 20:17:12 +0000
(12:17 -0800)
When the SIGNED condition is met, the variable `var` should be cast to
`long long` instead of `unsigned long long`.
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Link:
https://lore.kernel.org/bpf/20241112073701.283362-1-luoyifan@cmss.chinamobile.com
tools/bpf/bpftool/btf.c
patch
|
blob
|
history
diff --git
a/tools/bpf/bpftool/btf.c
b/tools/bpf/bpftool/btf.c
index
547c1cc
..
d005e4f
100644
(file)
--- a/
tools/bpf/bpftool/btf.c
+++ b/
tools/bpf/bpftool/btf.c
@@
-289,7
+289,7
@@
static int dump_btf_type(const struct btf *btf, __u32 id,
} else {
if (btf_kflag(t))
printf("\n\t'%s' val=%lldLL", name,
- (
unsigned
long long)val);
+ (long long)val);
else
printf("\n\t'%s' val=%lluULL", name,
(unsigned long long)val);