mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
bpftool: Cast variable var
to long long
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
This commit is contained in:
parent
a1087da9d1
commit
b7b31f184f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user