summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-05-06 16:28:33 +0100
committerRoy Marples <roy@marples.name>2018-05-06 16:28:33 +0100
commit1f00a082d8911e12105444b844f829561732b826 (patch)
tree63e8612f704c28b348494d7e1085d3957975aa51
parent03b7f6f101cf1a62cb36755a515884751d8df480 (diff)
downloaddhcpcd-1f00a082d8911e12105444b844f829561732b826.tar.xz
bpf: add braces to clarify intent of sizeof
-rw-r--r--src/bpf.c2
1 files changed, 1 insertions, 1 deletions
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)