Skip to content

Commit

Permalink
[NETLINK]: use container_of instead
Browse files Browse the repository at this point in the history
This could make future redesign of struct netlink_sock easier.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis Cheng authored and David S. Miller committed Oct 10, 2007
1 parent f7944fb commit 32b21e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct netlink_sock {

static inline struct netlink_sock *nlk_sk(struct sock *sk)
{
return (struct netlink_sock *)sk;
return container_of(sk, struct netlink_sock, sk);
}

struct nl_pid_hash {
Expand Down

0 comments on commit 32b21e0

Please sign in to comment.