diff options
author | jkim <jkim@FreeBSD.org> | 2008-08-28 22:41:31 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2008-08-28 22:41:31 +0000 |
commit | 1d9644cd1971cc45ecbdfab11f0f452a01645dfb (patch) | |
tree | b0b45206ce87b2efaf85ba12989ab0bfa1d88d08 /tools/regression/bpf | |
parent | a98280bcbe8c44fd320269943dc275dba8090193 (diff) | |
download | FreeBSD-src-1d9644cd1971cc45ecbdfab11f0f452a01645dfb.zip FreeBSD-src-1d9644cd1971cc45ecbdfab11f0f452a01645dfb.tar.gz |
Move comments to the right places.
Diffstat (limited to 'tools/regression/bpf')
-rw-r--r-- | tools/regression/bpf/bpf_filter/bpf_test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/regression/bpf/bpf_filter/bpf_test.c b/tools/regression/bpf/bpf_filter/bpf_test.c index d39878a..91386d7 100644 --- a/tools/regression/bpf/bpf_filter/bpf_test.c +++ b/tools/regression/bpf/bpf_filter/bpf_test.c @@ -133,17 +133,17 @@ bpf_validate(const struct bpf_insn *f, int len) return (1); for (i = 0; i < len; ++i) { - /* - * Check that that jumps are forward, and within - * the code block. - */ p = &f[i]; /* - * Check that the instruction is valid. + * Check that the code is valid. */ if ((p->code & 0xff00) || !(bpf_code_map[p->code >> 4] & (1 << (p->code & 0xf)))) return (0); + /* + * Check that that jumps are forward, and within + * the code block. + */ if (BPF_CLASS(p->code) == BPF_JMP) { register int from = i + 1; |