diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2021-06-19 09:44:54 +0530 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-06-22 17:04:02 +0200 |
commit | ee62a5c6bb100b6fb07f3da3818c10a24d440e10 (patch) | |
tree | 270269a64537986921e4e3338ae5594395b04be1 /tools/lib/bpf/nlattr.c | |
parent | 0ae64fb6b645e0f976e08bc3c05e518856f19d00 (diff) |
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 'tools/lib/bpf/nlattr.c')
-rw-r--r-- | tools/lib/bpf/nlattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c index b607fa9852b1..f57e77a6e40f 100644 --- a/tools/lib/bpf/nlattr.c +++ b/tools/lib/bpf/nlattr.c @@ -27,7 +27,7 @@ static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) int totlen = NLA_ALIGN(nla->nla_len); *remaining -= totlen; - return (struct nlattr *) ((char *) nla + totlen); + return (struct nlattr *)((void *)nla + totlen); } static int nla_ok(const struct nlattr *nla, int remaining) |