aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-netflow.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-06-26 10:52:37 -0400
committerPascal Quantin <pascal.quantin@gmail.com>2016-06-27 15:20:06 +0000
commit2ab415579491e4bc66ea58627bda504cae833b9e (patch)
tree0f7f8eaa4bd9d90c8f6066036522ef0fc65d137d /epan/dissectors/packet-netflow.c
parent8c37621ca733a24a972e3e069a537c06e650f435 (diff)
tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_string
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-netflow.c')
-rw-r--r--epan/dissectors/packet-netflow.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c
index 1a3c3443bf..f82f8c6838 100644
--- a/epan/dissectors/packet-netflow.c
+++ b/epan/dissectors/packet-netflow.c
@@ -5134,9 +5134,9 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
case 341: /* informationElementName */
{
- char *string = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
- ti = proto_tree_add_item(pdutree, hf_cflow_information_element_name,
- tvb, offset, length, ENC_UTF_8|ENC_NA);
+ const guint8 *string;
+ ti = proto_tree_add_item_ret_string(pdutree, hf_cflow_information_element_name,
+ tvb, offset, length, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &string);
/* Add name of element to root for this flow */
proto_item_append_text(pdutree, " [%s]", string);
}
@@ -6395,9 +6395,9 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
break;
case ((VENDOR_IXIA << 16) | 111):
{
- char *string = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
- ti = proto_tree_add_item(pdutree, hf_pie_ixia_l7_application_name,
- tvb, offset, length, ENC_ASCII|ENC_NA);
+ const guint8 *string;
+ ti = proto_tree_add_item_ret_string(pdutree, hf_pie_ixia_l7_application_name,
+ tvb, offset, length, ENC_ASCII|ENC_NA, wmem_packet_scope(), &string);
proto_item_append_text(pdutree, " (%s)", string);
}