diff options
Diffstat (limited to 'bpf_dump.c')
-rw-r--r-- | bpf_dump.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -20,12 +20,14 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include <config.h> #endif #include <pcap.h> #include <stdio.h> +#include "optimize.h" + void bpf_dump(const struct bpf_program *p, int option) { @@ -50,8 +52,10 @@ bpf_dump(const struct bpf_program *p, int option) } for (i = 0; i < n; ++insn, ++i) { #ifdef BDEBUG - extern int bids[]; - printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1); + if (i < NBIDS && bids[i] > 0) + printf("[%02d]", bids[i] - 1); + else + printf(" -- "); #endif puts(bpf_image(insn, i)); } |