summaryrefslogtreecommitdiff
path: root/packet-ospf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-02-14 05:23:32 +0000
committerGuy Harris <guy@alum.mit.edu>2002-02-14 05:23:32 +0000
commit055f13d2d1476c4c43b9be9a7abb43cd9c3f7668 (patch)
treef3b02845d8ae020c5ad0cae79d090cf17f5b7cd7 /packet-ospf.c
parent00d1c463ee53f9fe2cf9c424b8c18b4b69c0b6d7 (diff)
downloadwireshark-055f13d2d1476c4c43b9be9a7abb43cd9c3f7668.tar.gz
"tvb_ieee_to_long()" returns a "long", not a "long long", so you can't
print it with "%lld". In any case, not all platforms on which Ethereal can be built support 64-bit integral data types, and, even on those that do, not all of them support "%ll[doux]" as the format for printing those types, so do the arithmetic in floating point by multiplying the bytes/s values by 8.0, and print with "%.0f" instead. svn path=/trunk/; revision=4731
Diffstat (limited to 'packet-ospf.c')
-rw-r--r--packet-ospf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-ospf.c b/packet-ospf.c
index 3cdee69873..e0b91e9245 100644
--- a/packet-ospf.c
+++ b/packet-ospf.c
@@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.56 2002/02/14 02:32:14 ashokn Exp $
+ * $Id: packet-ospf.c,v 1.57 2002/02/14 05:23:32 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -908,9 +908,9 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
stlv_len);
for (i = 0; i < 8; i++) {
proto_tree_add_text(stlv_tree, tvb, stlv_offset+4+(i*4), 4,
- "Pri %d: %ld bytes/s (%lld bits/s)", i,
+ "Pri %d: %ld bytes/s (%.0f bits/s)", i,
tvb_ieee_to_long(tvb, stlv_offset + 4 + i*4),
- tvb_ieee_to_long(tvb, stlv_offset + 4 + i*4) * 8);
+ tvb_ieee_to_long(tvb, stlv_offset + 4 + i*4) * 8.0);
}
break;
@@ -946,9 +946,9 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
gmpls_lsp_enc_str, "Unknown (%d)"));
for (i = 0; i < 8; i++) {
proto_tree_add_text(stlv_tree, tvb, stlv_offset+8+(i*4), 4,
- "Pri %d: %ld bytes/s (%lld bits/s)", i,
+ "Pri %d: %ld bytes/s (%.0f bits/s)", i,
tvb_ieee_to_long(tvb, stlv_offset + 4 + i*4),
- tvb_ieee_to_long(tvb, stlv_offset + 4 + i*4) * 8);
+ tvb_ieee_to_long(tvb, stlv_offset + 4 + i*4) * 8.0);
}
break;