diff options
author | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> | 2013-01-09 02:19:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-10 02:38:23 -0500 |
commit | 95c7e0e4d4792f9c9629ad759c9be047a3ddbcc5 (patch) | |
tree | 5673e5919ce7af98d5a9c78f16e8d7883faf4b8b /net/ipv4/af_inet.c | |
parent | dd4544f05469aaaeee891d7dc54d66430344321e (diff) |
ipv4: Use FIELD_SIZEOF() in inet_init().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 24b384b7903e..4fdf96710d45 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1705,12 +1705,11 @@ static struct packet_type ip_packet_type __read_mostly = { | |||
1705 | 1705 | ||
1706 | static int __init inet_init(void) | 1706 | static int __init inet_init(void) |
1707 | { | 1707 | { |
1708 | struct sk_buff *dummy_skb; | ||
1709 | struct inet_protosw *q; | 1708 | struct inet_protosw *q; |
1710 | struct list_head *r; | 1709 | struct list_head *r; |
1711 | int rc = -EINVAL; | 1710 | int rc = -EINVAL; |
1712 | 1711 | ||
1713 | BUILD_BUG_ON(sizeof(struct inet_skb_parm) > sizeof(dummy_skb->cb)); | 1712 | BUILD_BUG_ON(sizeof(struct inet_skb_parm) > FIELD_SIZEOF(struct sk_buff, cb)); |
1714 | 1713 | ||
1715 | sysctl_local_reserved_ports = kzalloc(65536 / 8, GFP_KERNEL); | 1714 | sysctl_local_reserved_ports = kzalloc(65536 / 8, GFP_KERNEL); |
1716 | if (!sysctl_local_reserved_ports) | 1715 | if (!sysctl_local_reserved_ports) |