summaryrefslogtreecommitdiffstats
path: root/include/net/inetpeer.h
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-03-29 16:59:23 +0200
committerDavid S. Miller <davem@davemloft.net>2015-03-31 19:58:35 +0200
commit8f55db48608b109ad8c7ff4b946ad39b3189a540 (patch)
treeb7364235d94c0e15aa491858a4a574182292f5e1 /include/net/inetpeer.h
parentvxlan: fix indentation (diff)
downloadlinux-8f55db48608b109ad8c7ff4b946ad39b3189a540.tar.xz
linux-8f55db48608b109ad8c7ff4b946ad39b3189a540.zip
tcp: simplify inetpeer_addr_base 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. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inetpeer.h')
-rw-r--r--include/net/inetpeer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 80479abddf73..d5332ddcea3f 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -19,6 +19,7 @@ struct inetpeer_addr_base {
union {
__be32 a4;
__be32 a6[4];
+ struct in6_addr in6;
};
};
@@ -151,7 +152,7 @@ static inline struct inet_peer *inet_getpeer_v6(struct inet_peer_base *base,
{
struct inetpeer_addr daddr;
- *(struct in6_addr *)daddr.addr.a6 = *v6daddr;
+ daddr.addr.in6 = *v6daddr;
daddr.family = AF_INET6;
return inet_getpeer(base, &daddr, create);
}