diff options
author | Michael Forney <mforney@mforney.org> | 2019-08-11 04:49:07 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-08-16 05:42:03 (GMT) |
commit | de72910e6b3ec4503f23538682a89c4d444c7a92 (patch) | |
tree | adb4ac751ff7e9d2cbf3a17d9c2191fb0d80e56f /lib/xfrm/sa.c | |
parent | 1a88619b72c77b5390076ad703bfa3de4fa0348d (diff) | |
download | libnl-de72910e6b3ec4503f23538682a89c4d444c7a92.zip libnl-de72910e6b3ec4503f23538682a89c4d444c7a92.tar.gz libnl-de72910e6b3ec4503f23538682a89c4d444c7a92.tar.bz2 |
all: Avoid pointer arithmetic on `void *`
ISO C requires that the pointer operand to the binary + operator be to
a complete object type[0].
[0] http://port70.net/~nsz/c/c11/n1570.html#6.5.6p2
Diffstat (limited to 'lib/xfrm/sa.c')
-rw-r--r-- | lib/xfrm/sa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xfrm/sa.c b/lib/xfrm/sa.c index b469b0a..48265ba 100644 --- a/lib/xfrm/sa.c +++ b/lib/xfrm/sa.c @@ -682,7 +682,7 @@ int xfrmnl_sa_parse(struct nlmsghdr *n, struct xfrmnl_sa **result) } else if (n->nlmsg_type == XFRM_MSG_DELSA) { - sa_info = (struct xfrm_usersa_info*)(nlmsg_data(n) + sizeof (struct xfrm_usersa_id) + NLA_HDRLEN); + sa_info = (struct xfrm_usersa_info*)((char *)nlmsg_data(n) + sizeof (struct xfrm_usersa_id) + NLA_HDRLEN); } else { |