From: Roy Marples Date: Sun, 6 May 2018 15:28:33 +0000 (+0100) Subject: bpf: add braces to clarify intent of sizeof X-Git-Tag: v7.0.5~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f00a082d8911e12105444b844f829561732b826;p=thirdparty%2Fdhcpcd.git bpf: add braces to clarify intent of sizeof --- diff --git a/src/bpf.c b/src/bpf.c index 5a4d3c1d..537a7a6a 100644 --- a/src/bpf.c +++ b/src/bpf.c @@ -411,7 +411,7 @@ static const struct bpf_insn bpf_arp_ether [] = { /* 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)