mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
[SCTP]: flip_to_{h,n}() are not needed anymore.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7dcdbd9579
commit
c9c938cb05
@ -74,28 +74,6 @@ union sctp_addr {
|
|||||||
struct sockaddr sa;
|
struct sockaddr sa;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void flip_to_n(union sctp_addr *to, const union sctp_addr *from)
|
|
||||||
{
|
|
||||||
size_t len;
|
|
||||||
if (from->sa.sa_family == AF_INET6)
|
|
||||||
len = sizeof(struct sockaddr_in6);
|
|
||||||
else
|
|
||||||
len = sizeof(struct sockaddr);
|
|
||||||
memcpy(to, from, len);
|
|
||||||
to->v4.sin_port = htons(from->v4.sin_port);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void flip_to_h(union sctp_addr *to, const union sctp_addr *from)
|
|
||||||
{
|
|
||||||
size_t len;
|
|
||||||
if (from->sa.sa_family == AF_INET6)
|
|
||||||
len = sizeof(struct sockaddr_in6);
|
|
||||||
else
|
|
||||||
len = sizeof(struct sockaddr);
|
|
||||||
memcpy(to, from, len);
|
|
||||||
to->v4.sin_port = ntohs(from->v4.sin_port);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Forward declarations for data structures. */
|
/* Forward declarations for data structures. */
|
||||||
struct sctp_globals;
|
struct sctp_globals;
|
||||||
struct sctp_endpoint;
|
struct sctp_endpoint;
|
||||||
|
Loading…
Reference in New Issue
Block a user