aboutsummaryrefslogtreecommitdiff
path: root/src/netlink.c
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2021-06-19 09:44:54 +0530
committerAndrii Nakryiko <andrii.nakryiko@gmail.com>2021-07-16 17:05:44 -0700
commitf8411901c48f0f24a65db97d8737c4e8e6de5e44 (patch)
treee66ebd9b68ef708525cfd7c5e10713ed38b0f40f /src/netlink.c
parent9ff2b76693703e02c364c63dce5580458cb2ee5f (diff)
downloadlibbpf-f8411901c48f0f24a65db97d8737c4e8e6de5e44.tar.gz
libbpf: Switch to void * casting in netlink helpers
Netlink helpers I added in 8bbb77b7c7a2 ("libbpf: Add various netlink helpers") used char * casts everywhere, and there were a few more that existed from before. Convert all of them to void * cast, as it is treated equivalently by clang/gcc for the purposes of pointer arithmetic and to follow the convention elsewhere in the kernel/libbpf. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210619041454.417577-2-memxor@gmail.com
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c
index bfaa9a5..39f25e0 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -524,7 +524,7 @@ static int get_tc_info(struct nlmsghdr *nh, libbpf_dump_nlmsg_t fn,
struct nlattr *tb[TCA_MAX + 1];
libbpf_nla_parse(tb, TCA_MAX,
- (struct nlattr *)((char *)tc + NLMSG_ALIGN(sizeof(*tc))),
+ (struct nlattr *)((void *)tc + NLMSG_ALIGN(sizeof(*tc))),
NLMSG_PAYLOAD(nh, sizeof(*tc)), NULL);
if (!tb[TCA_KIND])
return NL_CONT;