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-nt-tpcp.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-nt-tpcp.c')
-rw-r--r-- | epan/dissectors/packet-nt-tpcp.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/epan/dissectors/packet-nt-tpcp.c b/epan/dissectors/packet-nt-tpcp.c index 301d67ae1f..2b08a159fa 100644 --- a/epan/dissectors/packet-nt-tpcp.c +++ b/epan/dissectors/packet-nt-tpcp.c @@ -144,10 +144,7 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tpcp_tree = proto_item_add_subtree(ti, ett_tpcp); proto_tree_add_uint(tpcp_tree, hf_tpcp_version, tvb, 0, 1, tpcph.version); - - proto_tree_add_uint_format(tpcp_tree, hf_tpcp_type, tvb, 1, 1, tpcph.type, - "Type: %s (%d)", - val_to_str_const(tpcph.type, type_vals, "Unknown"), tpcph.type); + proto_tree_add_uint(tpcp_tree, hf_tpcp_type, tvb, 1, 1, tpcph.type); /* flags next , i'll do that when I can work out how to do it :-( */ tf = proto_tree_add_text(tpcp_tree, tvb, 2, 2, "Flags: 0x%04x",tpcph.flags); @@ -160,8 +157,8 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(tpcp_tree, hf_tpcp_id, tvb, 4, 2, tpcph.id); - proto_tree_add_uint_format(tpcp_tree, hf_tpcp_cport, tvb, 6, 2, tpcph.cport, - "Client Source port: %s", get_udp_port(tpcph.cport)); + proto_tree_add_uint_format_value(tpcp_tree, hf_tpcp_cport, tvb, 6, 2, tpcph.cport, + "%s", get_udp_port(tpcph.cport)); proto_tree_add_ipv4(tpcp_tree, hf_tpcp_caddr, tvb, 8, 4, tpcph.caddr); @@ -185,7 +182,7 @@ proto_register_tpcp(void) "TPCP version", HFILL }}, { &hf_tpcp_type, - { "Type", "tpcp.type", FT_UINT8, BASE_DEC,NULL, 0x0, + { "Type", "tpcp.type", FT_UINT8, BASE_DEC, VALS(type_vals), 0x0, "PDU type", HFILL }}, { &hf_tpcp_flags_tcp, |