Skip to content

Commit

Permalink
ip_tunnels: use offsetofend
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Benc authored and David S. Miller committed Aug 20, 2015
1 parent 6b8847c commit 376534a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/net/ip_tunnels.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
#define IPTUNNEL_ERR_TIMEO (30*HZ)

/* Used to memset ip_tunnel padding. */
#define IP_TUNNEL_KEY_SIZE \
(offsetof(struct ip_tunnel_key, tp_dst) + \
FIELD_SIZEOF(struct ip_tunnel_key, tp_dst))
#define IP_TUNNEL_KEY_SIZE offsetofend(struct ip_tunnel_key, tp_dst)

struct ip_tunnel_key {
__be64 tun_id;
Expand Down

0 comments on commit 376534a

Please sign in to comment.