Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Luo Yifan and committed by
Andrii Nakryiko
b7b31f18 a1087da9

+1 -1
+1 -1
tools/bpf/bpftool/btf.c
··· 289 289 } else { 290 290 if (btf_kflag(t)) 291 291 printf("\n\t'%s' val=%lldLL", name, 292 - (unsigned long long)val); 292 + (long long)val); 293 293 else 294 294 printf("\n\t'%s' val=%lluULL", name, 295 295 (unsigned long long)val);