From 951fc9df9558ee5ae01cef7255b1a33078a7653c Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 31 Dec 2003 20:28:44 -0800 Subject: [NET]: Do type checking in {udp,inet6,raw6,inet}_sk(). --- include/linux/ip.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/linux/ip.h') diff --git a/include/linux/ip.h b/include/linux/ip.h index 1adc75a76926..ab799b48b485 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h @@ -159,7 +159,10 @@ struct inet_sock { struct inet_opt inet; }; -#define inet_sk(__sk) (&((struct inet_sock *)__sk)->inet) +static inline struct inet_opt * inet_sk(const struct sock *__sk) +{ + return &((struct inet_sock *)__sk)->inet; +} #endif -- cgit v1.2.3