Commit 89304f91 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

sctp: preserve const qualifier in sctp_sk()

We can change sctp_sk() to propagate its argument const qualifier,
thanks to container_of_const().
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: Xin Long <lucien.xin@gmail.com>
Acked-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ffabe98c
......@@ -242,10 +242,7 @@ struct sctp_sock {
int do_auto_asconf;
};
static inline struct sctp_sock *sctp_sk(const struct sock *sk)
{
return (struct sctp_sock *)sk;
}
#define sctp_sk(ptr) container_of_const(ptr, struct sctp_sock, inet.sk)
static inline struct sock *sctp_opt2sk(const struct sctp_sock *sp)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment