From: Guy Harris Date: Fri, 30 Nov 2012 21:03:21 +0000 (-0800) Subject: Squelch format vs. argument warnings from clang. X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/06caa319fa7711b75441591af669d068d907279d Squelch format vs. argument warnings from clang. --- diff --git a/bpf_image.c b/bpf_image.c index e2f1a774..e6c0f626 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; }