diff options
author | Michael Mann <mmann78@netscape.net> | 2014-06-06 10:35:50 -0400 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-06-07 15:41:07 +0000 |
commit | 73217d9f3fbff3d9f5a514cd7f2b7f4ca5f61947 (patch) | |
tree | 194ce9f6db1db1237a755f832d34367d2df8320b /epan/dissectors/packet-q931.c | |
parent | a048dc1d0d33728022831a538d878e967da88901 (diff) |
tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.
Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-q931.c')
-rw-r--r-- | epan/dissectors/packet-q931.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c index f32b9511a3..493dbde58e 100644 --- a/epan/dissectors/packet-q931.c +++ b/epan/dissectors/packet-q931.c @@ -2409,7 +2409,7 @@ dissect_q931_user_user_ie(tvbuff_t *tvb, packet_info *pinfo, int offset, int len switch (octet) { case Q931_PROTOCOL_DISCRIMINATOR_USER: - next_tvb = tvb_new_subset(tvb, offset, len, len); + next_tvb = tvb_new_subset_length(tvb, offset, len); proto_tree_add_uint_format_value(tree, hf_q931_user_information_len, tvb, offset, len, len, "%d octets", len); if (!dissector_try_heuristic(q931_user_heur_subdissector_list, next_tvb, pinfo, tree, &hdtbl_entry, NULL)) { call_dissector_only(data_handle, next_tvb, pinfo, tree, NULL); @@ -2664,7 +2664,7 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree, */ if (dissector_get_uint_handle(codeset_dissector_table, codeset) || dissector_get_uint_handle(ie_dissector_table, (codeset << 8) | (info_element & Q931_IE_SO_IDENTIFIER_MASK))) { - next_tvb = tvb_new_subset (tvb, offset, 1, 1); + next_tvb = tvb_new_subset_length (tvb, offset, 1); if (dissector_try_uint(ie_dissector_table, (codeset << 8) | (info_element & Q931_IE_SO_IDENTIFIER_MASK), next_tvb, pinfo, q931_tree) || dissector_try_uint(codeset_dissector_table, codeset, next_tvb, pinfo, q931_tree)) { offset += 1; @@ -2767,9 +2767,8 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree, * whether we're building a * protocol tree or not. */ - h225_tvb = tvb_new_subset(tvb, - offset + 4, info_element_len - 1, - info_element_len - 1); + h225_tvb = tvb_new_subset_length(tvb, + offset + 4, info_element_len - 1); call_dissector(h225_handle, h225_tvb, pinfo, root_tree); } else { @@ -2796,7 +2795,7 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree, */ if (dissector_get_uint_handle(codeset_dissector_table, codeset) || dissector_get_uint_handle(ie_dissector_table, (codeset << 8) | info_element)) { - next_tvb = tvb_new_subset (tvb, offset, info_element_len + 2, info_element_len + 2); + next_tvb = tvb_new_subset_length (tvb, offset, info_element_len + 2); if (dissector_try_uint(ie_dissector_table, (codeset << 8) | info_element, next_tvb, pinfo, q931_tree) || dissector_try_uint(codeset_dissector_table, codeset, next_tvb, pinfo, q931_tree)) { offset += 2 + info_element_len; |