[PATCH] bpftool: Fix wrong format output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: liujing <liujing_yewu@xxxxxxxxxxxxxxxxxxxx>

%d in format string requires 'int' but the argument type
of pf is 'unsigned int'.

Signed-off-by: liujing <liujing@xxxxxxxxxxxxxxxxxxxx>

diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c
index 5cd503b763d7..5bc442d93456 100644
--- a/tools/bpf/bpftool/link.c
+++ b/tools/bpf/bpftool/link.c
@@ -699,7 +699,7 @@ void netfilter_dump_plain(const struct bpf_link_info *info)
 	if (pfname)
 		printf("\n\t%s", pfname);
 	else
-		printf("\n\tpf: %d", pf);
+		printf("\n\tpf: %u", pf);
 
 	if (hookname)
 		printf(" %s", hookname);
-- 
2.27.0







[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux