diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-29 06:56:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-29 06:56:07 +0000 |
commit | d2ac4f7133b977b267c0b121aa2bdcb9507e0422 (patch) | |
tree | 7e4f2588b513edda09dc228f9704dc099692792d /epan/dissectors/packet-ansi_801.c | |
parent | 2a5ff70caab499848de0c327052d564a831ba559 (diff) |
Check for G_GINT64_MODIFIER in Wireshark as we do in Wiretap.
In all the places where a cast to "long long" or "unsigned long long"
was done, use G_GINT64_MODIFIER and get rid of the cast, as
1) there's no guarantee that "%ll" works
and
2) there's no guarantee that "long long" works
(the latter definitely does *NOT* work with MSVC++; the former doesn't
work with regular printf in MSVC++, but it might work with the GLib
printf-based functions).
svn path=/trunk/; revision=21978
Diffstat (limited to 'epan/dissectors/packet-ansi_801.c')
-rw-r--r-- | epan/dissectors/packet-ansi_801.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/epan/dissectors/packet-ansi_801.c b/epan/dissectors/packet-ansi_801.c index db746b8afa..dac6e2a760 100644 --- a/epan/dissectors/packet-ansi_801.c +++ b/epan/dissectors/packet-ansi_801.c @@ -1062,15 +1062,13 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) temp_int = ansi_801_tvb_get_bits(tvb, &new_offset, &bit_offset, 18); proto_tree_add_text(tree, tvb, offset, new_offset - offset, - "CLOCK_BIAS: (%llu)", - (unsigned long long) temp_int); + "CLOCK_BIAS: (%" G_GINT64_MODIFIER "u)", temp_int); offset = new_offset; temp_int = ansi_801_tvb_get_bits(tvb, &new_offset, &bit_offset, 16); proto_tree_add_text(tree, tvb, offset, new_offset - offset, - "CLOCK_DRIFT: (%llu)", - (unsigned long long) temp_int); + "CLOCK_DRIFT: (%" G_GINT64_MODIFIER "u)", temp_int); offset = new_offset; bit_mask = 0x80 >> (8 - bit_offset); @@ -1147,15 +1145,13 @@ pr_loc_response(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) temp_int = ansi_801_tvb_get_bits(tvb, &new_offset, &bit_offset, 14); proto_tree_add_text(tree, tvb, offset, new_offset - offset, - "HEIGHT: (%llu)", - (unsigned long long) temp_int); + "HEIGHT: (%" G_GINT64_MODIFIER "u)", temp_int); offset = new_offset; temp_int = ansi_801_tvb_get_bits(tvb, &new_offset, &bit_offset, 5); proto_tree_add_text(tree, tvb, offset, new_offset - offset, - "LOC_UNCRTNTY_V: (%llu)", - (unsigned long long) temp_int); + "LOC_UNCRTNTY_V: (%" G_GINT64_MODIFIER "u)", temp_int); offset = new_offset; bit_mask = 0x80 >> (8 - bit_offset); @@ -1232,8 +1228,7 @@ for_pr_gps_sat_health(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset temp_int = ansi_801_tvb_get_bits(tvb, &new_offset, &bit_offset, 5); proto_tree_add_text(tree, tvb, offset, 1, - "BAD_SV_PRN_NUM: (%llu)", - (unsigned long long) temp_int); + "BAD_SV_PRN_NUM: (%" G_GINT64_MODIFIER "u)", temp_int); offset = new_offset; } |