From a984eb367c032dbe2577f01238c3d1268526be70 Mon Sep 17 00:00:00 2001 From: Kacper Date: Thu, 25 Dec 2025 19:24:38 +0100 Subject: Clang-tidy fixes --- include/arch/x86_64/linux/if_packet.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'include/arch/x86_64/linux/if_packet.h') diff --git a/include/arch/x86_64/linux/if_packet.h b/include/arch/x86_64/linux/if_packet.h index 2bd0e81b..f2da4164 100644 --- a/include/arch/x86_64/linux/if_packet.h +++ b/include/arch/x86_64/linux/if_packet.h @@ -145,10 +145,8 @@ struct tpacket_hdr { }; #define TPACKET_ALIGNMENT 16 -#define TPACKET_ALIGN(x) \ - (((x) + TPACKET_ALIGNMENT - 1) & ~(TPACKET_ALIGNMENT - 1)) -#define TPACKET_HDRLEN \ - (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) +#define TPACKET_ALIGN(x) (((x) + TPACKET_ALIGNMENT - 1) & ~(TPACKET_ALIGNMENT - 1)) +#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) struct tpacket2_hdr { __u32 tp_status; @@ -253,12 +251,8 @@ struct tpacket_block_desc { union tpacket_bd_header_u hdr; }; -#define TPACKET2_HDRLEN \ - (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + \ - sizeof(struct sockaddr_ll)) -#define TPACKET3_HDRLEN \ - (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + \ - sizeof(struct sockaddr_ll)) +#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) +#define TPACKET3_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + sizeof(struct sockaddr_ll)) enum tpacket_versions { TPACKET_V1, TPACKET_V2, TPACKET_V3 }; -- cgit v1.2.3