From 37600a157ba2036a79a5ebf466b31b8eee19244e Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Fri, 29 Mar 2013 00:26:23 +0000 Subject: Rename value string (and similar) functions to use a consistent pattern. This was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634 --- epan/dissectors/packet-tpncp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-tpncp.c') diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c index 3c85ab78ac..5ec37e0e57 100644 --- a/epan/dissectors/packet-tpncp.c +++ b/epan/dissectors/packet-tpncp.c @@ -290,7 +290,7 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_uint(tpncp_tree, hf_tpncp_reserved, tvb, 6, 2, reserved); if (pinfo->srcport == UDP_PORT_TPNCP_TRUNKPACK) { - if (match_strval(id, tpncp_events_id_vals)) { + if (try_val_to_str(id, tpncp_events_id_vals)) { proto_tree_add_uint(tpncp_tree, hf_tpncp_event_id, tvb, 8, 4, id); proto_tree_add_int(tpncp_tree, hf_tpncp_cid, tvb, 12, 4, cid); offset += 16; @@ -302,7 +302,7 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { } } else { - if (match_strval(id, tpncp_commands_id_vals)) { + if (try_val_to_str(id, tpncp_commands_id_vals)) { proto_tree_add_uint(tpncp_tree, hf_tpncp_command_id, tvb, 8, 4, id); offset += 12; if (tpncp_commands_info_db[id].tpncp_data_field_size) { -- cgit v1.2.3