Commit b4fff5f8 authored by YOSHIFUJI Hideaki / 吉藤英明's avatar YOSHIFUJI Hideaki / 吉藤英明 Committed by David S. Miller

unix: Use FIELD_SIZEOF() in af_unix_init().

Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce6654cf
...@@ -2426,9 +2426,8 @@ static struct pernet_operations unix_net_ops = { ...@@ -2426,9 +2426,8 @@ static struct pernet_operations unix_net_ops = {
static int __init af_unix_init(void) static int __init af_unix_init(void)
{ {
int rc = -1; int rc = -1;
struct sk_buff *dummy_skb;
BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb)); BUILD_BUG_ON(sizeof(struct unix_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
rc = proto_register(&unix_proto, 1); rc = proto_register(&unix_proto, 1);
if (rc != 0) { if (rc != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment