aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dtpt.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-05-20 20:21:14 +0000
committerBill Meier <wmeier@newsguy.com>2011-05-20 20:21:14 +0000
commit046726f45404e5c5a91355ea68ab295274f3fc45 (patch)
tree427a97d5095d291c4a45b11561c4bc0b9aaa3153 /epan/dissectors/packet-dtpt.c
parent8504d231c77965f25c4bb4643cc674086e14b8ed (diff)
Remove unneeded code: Fixes Coverity 890 [UNUSED].
svn path=/trunk/; revision=37337
Diffstat (limited to 'epan/dissectors/packet-dtpt.c')
-rw-r--r--epan/dissectors/packet-dtpt.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c
index bcd99bac40..3001020bac 100644
--- a/epan/dissectors/packet-dtpt.c
+++ b/epan/dissectors/packet-dtpt.c
@@ -410,7 +410,6 @@ static int
dissect_dtpt_conversation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint offset = 0;
- guint rest_length;
/* First try to decode it as "normal" DTPT packets. */
offset = dissect_dtpt(tvb, pinfo, tree);
@@ -420,14 +419,11 @@ dissect_dtpt_conversation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = dissect_dtpt_data(tvb, pinfo, tree);
}
- /* Handle the rest ... */
- rest_length = tvb_reported_length(tvb) - offset;
- if (rest_length > 0) {
- tvbuff_t *next_tvb;
+ /* Handle the any remaining ... */
+ if (tvb_reported_length_remaining(tvb, offset) > 0) {
/* ... as data. */
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset), pinfo, tree);
- next_tvb = tvb_new_subset(tvb, offset, rest_length, rest_length);
}
return tvb_reported_length(tvb);
}