Constify the temporary pointer, as was done in libpcap in 2008. Remove
the BDEBUG conditional block becase in libpcap that is a part of the
optimizer debug feature, but in tcpdump it is dead code.
void
bpf_dump(const struct bpf_program *p, int option)
{
- struct bpf_insn *insn;
+ const struct bpf_insn *insn;
int i;
int n = p->bf_len;
return;
}
for (i = 0; i < n; ++insn, ++i) {
-#ifdef BDEBUG
- extern int bids[];
- printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1);
-#endif
puts(bpf_image(insn, i));
}
}