Skip to content

Commit

Permalink
rxrpc: Use FIELD_SIZEOF() in af_rxrpc_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 3523b29 commit ce6654c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/rxrpc/af_rxrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/net.h>
#include <linux/slab.h>
#include <linux/skbuff.h>
Expand Down Expand Up @@ -792,10 +793,9 @@ static const struct net_proto_family rxrpc_family_ops = {
*/
static int __init af_rxrpc_init(void)
{
struct sk_buff *dummy_skb;
int ret = -1;

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

rxrpc_epoch = htonl(get_seconds());

Expand Down

0 comments on commit ce6654c

Please sign in to comment.