xfrm: simplify xfrm_address_t use

In many places, the a6 field is typecasted to struct in6_addr. As the
fields are in union anyway, just add in6_addr type to the union and
get rid of the typecasting.

Modifying the uapi header is okay, the union has still the same size.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Benc
2015-03-29 16:59:24 +02:00
committed by David S. Miller
parent 8f55db4860
commit 15e318bdc6
6 changed files with 13 additions and 13 deletions

View File

@@ -709,7 +709,7 @@ static unsigned int pfkey_sockaddr_fill(const xfrm_address_t *xaddr, __be16 port
sin6->sin6_family = AF_INET6;
sin6->sin6_port = port;
sin6->sin6_flowinfo = 0;
sin6->sin6_addr = *(struct in6_addr *)xaddr->a6;
sin6->sin6_addr = xaddr->in6;
sin6->sin6_scope_id = 0;
return 128;
}