]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
bpf: add braces to clarify intent of sizeof
authorRoy Marples <roy@marples.name>
Sun, 6 May 2018 15:28:33 +0000 (16:28 +0100)
committerRoy Marples <roy@marples.name>
Sun, 6 May 2018 15:28:33 +0000 (16:28 +0100)
src/bpf.c

index 5a4d3c1d373880dd9742a121c00d6e9ae208ae41..537a7a6a2f5601b547cb35540e9b5d041803f80c 100644 (file)
--- 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)