diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-22 17:05:37 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-23 00:06:19 +0000 |
commit | 67ab8a059c489022aebe0e27d1f937c7b6abad06 (patch) | |
tree | 6b6cb9e97c0b56ac14ea8224760356e1c5965748 /epan/dissectors/packet-rfid-pn532-hci.c | |
parent | a43682d4fd9075f07f8dce1ddc5bda3e07296c27 (diff) |
Remove more deprecated tvb_length
Change-Id: I36603453c2563406f82663683930088dedd5f39c
Reviewed-on: https://code.wireshark.org/review/9041
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rfid-pn532-hci.c')
-rw-r--r-- | epan/dissectors/packet-rfid-pn532-hci.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-rfid-pn532-hci.c b/epan/dissectors/packet-rfid-pn532-hci.c index acf08e28d8..93c047a672 100644 --- a/epan/dissectors/packet-rfid-pn532-hci.c +++ b/epan/dissectors/packet-rfid-pn532-hci.c @@ -79,7 +79,7 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat return 0; usb_conv_info = (usb_conv_info_t *)data; - length = tvb_length_remaining(tvb, offset); + length = tvb_captured_length_remaining(tvb, offset); if (length < 6) return offset; col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN532_HCI"); @@ -89,7 +89,7 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat main_tree = proto_item_add_subtree(main_item, ett_pn532_hci); length = 0; - while (tvb_length_remaining(tvb, length) >= 2 && tvb_get_ntohs(tvb, length) != 0x00FF) { + while (tvb_captured_length_remaining(tvb, length) >= 2 && tvb_get_ntohs(tvb, length) != 0x00FF) { length += 1; } if (length) { @@ -177,9 +177,9 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat } length = 0; - if (tvb_length_remaining(tvb, offset) == 1) { + if (tvb_captured_length_remaining(tvb, offset) == 1) { length = 1; - } else while (tvb_length_remaining(tvb, offset + length) >= 2 && tvb_get_ntohs(tvb, offset + length) != 0x00FF) { + } else while (tvb_captured_length_remaining(tvb, offset + length) >= 2 && tvb_get_ntohs(tvb, offset + length) != 0x00FF) { length += 1; } if (length) { @@ -187,9 +187,9 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat offset += length; } - if (tvb_length_remaining(tvb, offset)) { - proto_tree_add_item(main_tree, hf_ignored, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA); - offset += tvb_length_remaining(tvb, offset); + if (tvb_captured_length_remaining(tvb, offset)) { + proto_tree_add_item(main_tree, hf_ignored, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA); + offset += tvb_captured_length_remaining(tvb, offset); } return offset; |