aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb-com.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-02-23 23:23:40 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2014-02-23 22:28:40 +0000
commit1678b0a825b41c0beb5fdfe6d43543a03b294ac8 (patch)
treec125d4ea6ae60cc092d76c5ff192f2efb760e241 /epan/dissectors/packet-usb-com.c
parentbdfa3e8b9fe9044d315ce8c01c0675709e632b3a (diff)
Remove deprecated TVB APIs
Change-Id: I87216c3bd2061c12ce486c752d4381ab722db95e Reviewed-on: https://code.wireshark.org/review/328 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-usb-com.c')
-rw-r--r--epan/dissectors/packet-usb-com.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-usb-com.c b/epan/dissectors/packet-usb-com.c
index b9af854038..9c477de2b4 100644
--- a/epan/dissectors/packet-usb-com.c
+++ b/epan/dissectors/packet-usb-com.c
@@ -2,8 +2,6 @@
* Routines for USB Communications and CDC Control dissection
* Copyright 2013, Pascal Quantin <pascal.quantin@gmail.com>
*
- * $Id$
- *
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
@@ -343,7 +341,7 @@ dissect_usb_com_descriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset = 3;
proto_tree_add_item(subtree, hf_usb_com_control_interface, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
- while (tvb_length_remaining(tvb,offset) > 0) {
+ while (tvb_reported_length_remaining(tvb,offset) > 0) {
proto_tree_add_item(subtree, hf_usb_com_subordinate_interface, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
}
@@ -361,10 +359,10 @@ dissect_usb_com_descriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
}
- if (tvb_reported_length_remaining(tvb, offset) != 0) {
+ if (tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_item(subtree, hf_usb_com_descriptor_payload, tvb, offset, -1, ENC_NA);
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static int
@@ -540,7 +538,7 @@ dissect_usb_com_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
if (tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_item(subtree, hf_usb_com_control_payload, tvb, offset, -1, ENC_NA);
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static int