]> git.hungrycats.org Git - linux/commitdiff
[TCP]: Make tcp_sk() do type checking.
authorIngo Molnar <mingo@elte.hu>
Tue, 30 Dec 2003 06:46:55 +0000 (22:46 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Tue, 30 Dec 2003 06:46:55 +0000 (22:46 -0800)
include/linux/tcp.h

index 3a2e7bf3c44a2793ccd1f9a3f857ed06053309b4..d25e5bd21c4dd4f02381250f3f581d43f051fd73 100644 (file)
@@ -386,7 +386,10 @@ struct tcp_sock {
        struct tcp_opt    tcp;
 };
 
-#define tcp_sk(__sk) (&((struct tcp_sock *)__sk)->tcp)
+static inline struct tcp_opt * tcp_sk(const struct sock *__sk)
+{
+       return &((struct tcp_sock *)__sk)->tcp;
+}
 
 #endif