forked from osmocom/wireshark
tvb_length is a macro wrapper for tvb_captured_length; use tvbuff_length.
This squelches a compiler warning on some platforms. Change-Id: Ibee5c2fe07fc58e22a860b4c4467a501c2b8a979 Reviewed-on: https://code.wireshark.org/review/7079 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
707522396c
commit
207b52a988
|
@ -2467,21 +2467,21 @@ proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
|||
/* Add a FT_BYTES to a proto_tree */
|
||||
proto_item *
|
||||
proto_tree_add_bytes_with_length(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint tvb_length, const guint8 *start_ptr, gint ptr_length)
|
||||
gint tvbuff_length, const guint8 *start_ptr, gint ptr_length)
|
||||
{
|
||||
proto_item *pi;
|
||||
header_field_info *hfinfo;
|
||||
gint item_length;
|
||||
|
||||
PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo);
|
||||
get_hfi_length(hfinfo, tvb, start, &tvb_length, &item_length);
|
||||
get_hfi_length(hfinfo, tvb, start, &tvbuff_length, &item_length);
|
||||
test_length(hfinfo, tvb, start, item_length);
|
||||
|
||||
TRY_TO_FAKE_THIS_ITEM(tree, hfindex, hfinfo);
|
||||
|
||||
DISSECTOR_ASSERT_FIELD_TYPE(hfinfo, FT_BYTES);
|
||||
|
||||
pi = proto_tree_add_pi(tree, hfinfo, tvb, start, &tvb_length);
|
||||
pi = proto_tree_add_pi(tree, hfinfo, tvb, start, &tvbuff_length);
|
||||
proto_tree_set_bytes(PNODE_FINFO(pi), start_ptr, ptr_length);
|
||||
|
||||
return pi;
|
||||
|
|
Loading…
Reference in New Issue