Skip to content

Commit

Permalink
ipv6: Use FIELD_SIZEOF() in inet6_init().
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 10, 2013
1 parent 95c7e0e commit ba96bcb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,11 +811,10 @@ static struct pernet_operations inet6_net_ops = {

static int __init inet6_init(void)
{
struct sk_buff *dummy_skb;
struct list_head *r;
int err = 0;

BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb));
BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > FIELD_SIZEOF(struct sk_buff, cb));

/* Register the socket-side information for inet6_create. */
for (r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r)
Expand Down

0 comments on commit ba96bcb

Please sign in to comment.