aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tpncp.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-08-10 22:55:02 +0000
committerBill Meier <wmeier@newsguy.com>2012-08-10 22:55:02 +0000
commit638d74d43f9baf45dc3641939eec36f801414187 (patch)
tree5bfcabbb83a6e7359cfc302cdc604264560d66a0 /epan/dissectors/packet-tpncp.c
parente6ffe7b59b9f36c534d3b2d6cc78b05dfe517f67 (diff)
Use val_to_str_const() where appropriate;
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
Diffstat (limited to 'epan/dissectors/packet-tpncp.c')
-rw-r--r--epan/dissectors/packet-tpncp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c
index 0dfc51843a..8bbe430f1a 100644
--- a/epan/dissectors/packet-tpncp.c
+++ b/epan/dissectors/packet-tpncp.c
@@ -276,12 +276,12 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
if (pinfo->srcport == UDP_PORT_TPNCP_TRUNKPACK) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"EvID=%s(%d), SeqNo=%d, ChID=%d, Len=%d, Ver=%d",
- val_to_str(id, tpncp_events_id_vals, "Unknown"),
+ val_to_str_const(id, tpncp_events_id_vals, "Unknown"),
id, seq_number, cid, len, ver);
} else {
col_add_fstr(pinfo->cinfo, COL_INFO,
"CmdID=%s(%d), SeqNo=%d, Len=%d, Ver=%d",
- val_to_str(id, tpncp_commands_id_vals, "Unknown"),
+ val_to_str_const(id, tpncp_commands_id_vals, "Unknown"),
id, seq_number, len, ver);
}
}
@@ -301,7 +301,7 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_int(tpncp_tree, hf_tpncp_cid, tvb, 12, 4, cid);
offset += 16;
if (tpncp_events_info_db[id].tpncp_data_field_size) {
- tpncp_header = ep_strdup_printf("TPNCP Event: %s (%d)", val_to_str(id, tpncp_events_id_vals, "Unknown"), id);
+ tpncp_header = ep_strdup_printf("TPNCP Event: %s (%d)", val_to_str_const(id, tpncp_events_id_vals, "Unknown"), id);
tpncp_item = proto_tree_add_text(tree, tvb, offset, -1, "%s", tpncp_header);
dissect_tpncp_event(id, tvb, tpncp_item, &offset);
}
@@ -312,7 +312,7 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
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) {
- tpncp_header = ep_strdup_printf("TPNCP Command: %s (%d)", val_to_str(id, tpncp_commands_id_vals, "Unknown"), id);
+ tpncp_header = ep_strdup_printf("TPNCP Command: %s (%d)", val_to_str_const(id, tpncp_commands_id_vals, "Unknown"), id);
tpncp_item = proto_tree_add_text(tree, tvb, offset, -1, "%s", tpncp_header);
dissect_tpncp_command(id, tvb, tpncp_item, &offset);
}