summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf_filter.c
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>1999-12-02 19:36:05 +0000
committerarchie <archie@FreeBSD.org>1999-12-02 19:36:05 +0000
commit47cb60fd855e46d5db07270ed611c5942ba5b7ed (patch)
tree018a62c7b94ea2e5ca0bbdd522982d2977803a04 /sys/net/bpf_filter.c
parentc97e39268be89e61a5f91f95ef70320e641e1d52 (diff)
downloadFreeBSD-src-47cb60fd855e46d5db07270ed611c5942ba5b7ed.zip
FreeBSD-src-47cb60fd855e46d5db07270ed611c5942ba5b7ed.tar.gz
Add 'const' to the bpf_filter() and bpf_validate() prototypes.
Remove a stale comment from bpf_validate().
Diffstat (limited to 'sys/net/bpf_filter.c')
-rw-r--r--sys/net/bpf_filter.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/bpf_filter.c b/sys/net/bpf_filter.c
index bff9163..0b2ed9e 100644
--- a/sys/net/bpf_filter.c
+++ b/sys/net/bpf_filter.c
@@ -183,7 +183,7 @@ m_xhalf(m, k, err)
*/
u_int
bpf_filter(pc, p, wirelen, buflen)
- register struct bpf_insn *pc;
+ register const struct bpf_insn *pc;
register u_char *p;
u_int wirelen;
register u_int buflen;
@@ -512,19 +512,17 @@ bpf_filter(pc, p, wirelen, buflen)
* Return true if the 'fcode' is a valid filter program.
* The constraints are that each jump be forward and to a valid
* code. The code must terminate with either an accept or reject.
- * 'valid' is an array for use by the routine (it must be at least
- * 'len' bytes long).
*
* The kernel needs to be able to verify an application's filter code.
* Otherwise, a bogus program could easily crash the system.
*/
int
bpf_validate(f, len)
- struct bpf_insn *f;
+ const struct bpf_insn *f;
int len;
{
register int i;
- register struct bpf_insn *p;
+ register const struct bpf_insn *p;
for (i = 0; i < len; ++i) {
/*
OpenPOWER on IntegriCloud