[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241112073701.283362-1-luoyifan@cmss.chinamobile.com>
Date: Tue, 12 Nov 2024 15:37:01 +0800
From: Luo Yifan <luoyifan@...s.chinamobile.com>
To: andrii.nakryiko@...il.com,
qmo@...nel.org
Cc: andrii@...nel.org,
ast@...nel.org,
bpf@...r.kernel.org,
daniel@...earbox.net,
eddyz87@...il.com,
haoluo@...gle.com,
john.fastabend@...il.com,
jolsa@...nel.org,
kpsingh@...nel.org,
linux-kernel@...r.kernel.org,
luoyifan@...s.chinamobile.com,
martin.lau@...ux.dev,
sdf@...ichev.me,
song@...nel.org,
yonghong.song@...ux.dev
Subject: [PATCH] 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@...s.chinamobile.com>
---
tools/bpf/bpftool/btf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
index 547c1ccdc..d005e4fd6 100644
--- 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);
--
2.27.0
Powered by blists - more mailing lists