diff options
author | Michael Mann <mmann78@netscape.net> | 2013-09-16 10:39:06 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-09-16 10:39:06 +0000 |
commit | 346f803d42ac477109e02df2578eb8c86ccf4c4f (patch) | |
tree | 4277e1e48aeb6d492ceb835af645460070fb04ec /epan/dissectors/packet-gtpv2.c | |
parent | 58e4750ecbf593fb678c713da398979b7fb2ed5d (diff) |
Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string
There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.
svn path=/trunk/; revision=52098
Diffstat (limited to 'epan/dissectors/packet-gtpv2.c')
-rw-r--r-- | epan/dissectors/packet-gtpv2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index 8ab2d1d00c..a191fd4bcc 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -4894,14 +4894,14 @@ dissect_gtpv2_mmbr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot guint32 max_dl; max_ul = tvb_get_ntohl(tvb, offset); - proto_tree_add_uint_format(tree, hf_gtpv2_mmbr_ul, tvb, offset, 4, max_ul, "Max MBR/APN-AMBR for uplink : %u %s", + proto_tree_add_uint_format_value(tree, hf_gtpv2_mmbr_ul, tvb, offset, 4, max_ul, "%u %s", (max_ul) > 1000 ? max_ul/1000 : max_ul, (max_ul) > 1000 ? "Mbps" : "kbps"); offset += 4; max_dl = tvb_get_ntohl(tvb, offset); - proto_tree_add_uint_format(tree, hf_gtpv2_mmbr_dl, tvb, offset, 4, max_dl, "Max MBR/APN-AMBR for downlink : %u %s", + proto_tree_add_uint_format_value(tree, hf_gtpv2_mmbr_dl, tvb, offset, 4, max_dl, "%u %s", (max_dl) > 1000 ? max_dl/1000 : max_dl, (max_dl) > 1000 ? "Mbps" : "kbps"); } |