summaryrefslogtreecommitdiff
path: root/print-ospf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-03-08 09:11:25 -0800
committerGuy Harris <guy@alum.mit.edu>2011-03-08 09:11:25 -0800
commit91942a9cb63f69da45f5c6d838594e3547a82ae2 (patch)
tree57682d17b9eca9c061f8c519113f5762a8734628 /print-ospf.c
parent7e44242ea8bf97bfb7e0dee248bff11a54f44b06 (diff)
downloadtcpdump-91942a9cb63f69da45f5c6d838594e3547a82ae2.tar.gz
Fix plurals in packet count messages.
Based on a patch from cr4ckn@sourceforge.net, but with a macro PLURAL_SUFFIX() defined to return either "s" or "" (rather than possibly printing a NUL character with %c), and with that macro used in a couple of cases where the equivalent had been done by hand, and with one case the patch missed fixed as well.
Diffstat (limited to 'print-ospf.c')
-rw-r--r--print-ospf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print-ospf.c b/print-ospf.c
index 983c14f4..738a13c2 100644
--- a/print-ospf.c
+++ b/print-ospf.c
@@ -1028,7 +1028,7 @@ ospf_decode_v2(register const struct ospfhdr *op,
lsap = op->ospf_lsu.lsu_lsa;
TCHECK(op->ospf_lsu.lsu_count);
lsa_count_max = EXTRACT_32BITS(&op->ospf_lsu.lsu_count);
- printf(", %d LSA%s",lsa_count_max, lsa_count_max > 1 ? "s" : "");
+ printf(", %d LSA%s",lsa_count_max, PLURAL_SUFFIX(lsa_count_max));
for (lsa_count=1;lsa_count <= lsa_count_max;lsa_count++) {
printf("\n\t LSA #%u",lsa_count);
lsap = (const struct lsa *)ospf_print_lsa(lsap);