summaryrefslogtreecommitdiffstats
path: root/lib/xfrm/sa.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-08-11 04:49:07 (GMT)
committerThomas Haller <thaller@redhat.com>2019-08-16 05:42:03 (GMT)
commitde72910e6b3ec4503f23538682a89c4d444c7a92 (patch)
treeadb4ac751ff7e9d2cbf3a17d9c2191fb0d80e56f /lib/xfrm/sa.c
parent1a88619b72c77b5390076ad703bfa3de4fa0348d (diff)
downloadlibnl-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.c2
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
{