aboutsummaryrefslogtreecommitdiff
path: root/bpf_dump.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2017-02-12 07:04:44 +0000
committerXin LI <delphij@FreeBSD.org>2017-02-12 07:04:44 +0000
commitc8c6d70e300aa9261c4766502c179fc4cd2b22a0 (patch)
tree14c068bb8b49db9f9ae540e8e2be80a9035e403a /bpf_dump.c
parent50224b10fa4e157f09ee1cd03c790c9e61e76c5e (diff)
Diffstat (limited to 'bpf_dump.c')
-rw-r--r--bpf_dump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bpf_dump.c b/bpf_dump.c
index 5eaadc08aad2..d5ab61e5e8ff 100644
--- a/bpf_dump.c
+++ b/bpf_dump.c
@@ -51,7 +51,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 (bids[i] > 0)
+ printf("[%02d]", bids[i] - 1);
+ else
+ printf(" -- ");
#endif
puts(bpf_image(insn, i));
}