changeset 4276:0780bdeb5e75 draft

bpf: add braces to clarify intent of sizeof
author Roy Marples <roy@marples.name>
date Sun, 06 May 2018 16:28:33 +0100
parents 9b00b7b02e72
children 97f2363a60cf
files src/bpf.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/bpf.c	Sun May 06 16:26:11 2018 +0100
+++ b/src/bpf.c	Sun May 06 16:28:33 2018 +0100
@@ -411,7 +411,7 @@
 	/* Make sure the hardware length matches. */
 	BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct arphdr, ar_hln)),
 	BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K,
-	         sizeof((struct ether_arp *)0)->arp_sha, 1, 0),
+	         sizeof(((struct ether_arp *)0)->arp_sha), 1, 0),
 	BPF_STMT(BPF_RET + BPF_K, 0),
 };
 #define bpf_arp_ether_len	__arraycount(bpf_arp_ether)