summaryrefslogtreecommitdiff
path: root/bpf_image.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-05-30 06:41:26 +0000
committerXin LI <delphij@FreeBSD.org>2013-05-30 06:41:26 +0000
commit59ed76438047aa730b3a617abd873b84457fc4fd (patch)
treedcf9aa60c012e16ad8a4bb83641d382d572050f8 /bpf_image.c
parent3ca61f8b14e648b24f10072d662c12fb35fc4b44 (diff)
Notes
Diffstat (limited to 'bpf_image.c')
-rw-r--r--bpf_image.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/bpf_image.c b/bpf_image.c
index e2f1a774a4f41..e6c0f626174bc 100644
--- a/bpf_image.c
+++ b/bpf_image.c
@@ -292,11 +292,14 @@ bpf_image(p, n)
break;
}
(void)snprintf(operand, sizeof operand, fmt, v);
- (void)snprintf(image, sizeof image,
- (BPF_CLASS(p->code) == BPF_JMP &&
- BPF_OP(p->code) != BPF_JA) ?
- "(%03d) %-8s %-16s jt %d\tjf %d"
- : "(%03d) %-8s %s",
- n, op, operand, n + 1 + p->jt, n + 1 + p->jf);
+ if (BPF_CLASS(p->code) == BPF_JMP && BPF_OP(p->code) != BPF_JA) {
+ (void)snprintf(image, sizeof image,
+ "(%03d) %-8s %-16s jt %d\tjf %d",
+ n, op, operand, n + 1 + p->jt, n + 1 + p->jf);
+ } else {
+ (void)snprintf(image, sizeof image,
+ "(%03d) %-8s %s",
+ n, op, operand);
+ }
return image;
}