forked from osmocom/wireshark
"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
This commit is contained in:
parent
00d1c463ee
commit
055f13d2d1
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue