From: Roy Marples Date: Tue, 1 Apr 2014 10:17:09 +0000 (+0000) Subject: Move the bpf filter len to a define. X-Git-Tag: v6.4.0~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f1c32f2790a8cbc1e9209a13db19b3ec7657cb11;p=thirdparty%2Fdhcpcd.git Move the bpf filter len to a define. --- diff --git a/bpf-filter.h b/bpf-filter.h index 469db0ec..08df683c 100644 --- a/bpf-filter.h +++ b/bpf-filter.h @@ -47,8 +47,7 @@ static const struct bpf_insn arp_bpf_filter [] = { /* Otherwise, drop it. */ BPF_STMT(BPF_RET + BPF_K, 0), }; -static const unsigned int arp_bpf_filter_len = - sizeof(arp_bpf_filter) / sizeof(arp_bpf_filter[0]); +#define arp_bpf_filter_len sizeof(arp_bpf_filter) / sizeof(arp_bpf_filter[0]) /* dhcp_bpf_filter taken from bpf.c in dhcp-3.1.0 @@ -97,5 +96,4 @@ static const struct bpf_insn dhcp_bpf_filter [] = { /* Otherwise, drop it. */ BPF_STMT(BPF_RET + BPF_K, 0), }; -static const unsigned int dhcp_bpf_filter_len = - sizeof(dhcp_bpf_filter) / sizeof(dhcp_bpf_filter[0]); +#define dhcp_bpf_filter_len sizeof(dhcp_bpf_filter) / sizeof(dhcp_bpf_filter[0])