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:

committed by
David S. Miller

parent
8f55db4860
commit
15e318bdc6
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user