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

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
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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)
{