aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scop.c
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2012-03-06 16:58:09 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2012-03-06 16:58:09 +0000
commit089e1deb813275e5ce3221e9818d62a5559b5ba9 (patch)
tree8200697d203e7a7537f7aa02fd6a22c2b35f53ea /epan/dissectors/packet-scop.c
parentd6cf7d26f9eecd140341e69ce58dc77caf3384d3 (diff)
Use tvb_new_subset_remaining() rather than tvb_new_subset();
#include <styring.h> not req'd (in a few cases); Minor reformating & whitespace cleanup. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41374 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-scop.c')
-rw-r--r--epan/dissectors/packet-scop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-scop.c b/epan/dissectors/packet-scop.c
index 887aeade9c..f314dde8cd 100644
--- a/epan/dissectors/packet-scop.c
+++ b/epan/dissectors/packet-scop.c
@@ -193,8 +193,8 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *proto_root;
proto_tree *scop_tree;
- guint offset = 0;
- scop_packet packet;
+ guint offset = 0;
+ scop_packet packet;
memset(&packet, 0, sizeof(packet));
@@ -245,16 +245,16 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Call the appropriate helper routine to dissect based on the service type. */
switch (packet.service) {
case SCOP_SERVICE_SCOP:
- dissect_scop_zip(tvb_new_subset(next_tvb, offset, -1, -1), pinfo, scop_tree);
+ dissect_scop_zip(tvb_new_subset_remaining(next_tvb, offset), pinfo, scop_tree);
break;
case SCOP_SERVICE_BRIDGE:
- dissect_scop_bridge(tvb_new_subset(next_tvb, offset, -1, -1), pinfo, scop_tree);
+ dissect_scop_bridge(tvb_new_subset_remaining(next_tvb, offset), pinfo, scop_tree);
break;
case SCOP_SERVICE_GATEWAY:
/* Nothing yet defined for the gateway. Fall-Through. */
default:
/* Unknown Service Type. */
- call_dissector(data_handle, tvb_new_subset(next_tvb, offset, -1, -1), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset_remaining(next_tvb, offset), pinfo, tree);
break;
}
} /* dissect_scop() */
@@ -293,7 +293,7 @@ dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* If there are any bytes left over, pass them to the data dissector. */
if (offset < tvb_length(tvb)) {
- tvbuff_t *payload_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ tvbuff_t *payload_tvb = tvb_new_subset_remaining(tvb, offset);
proto_tree *root = proto_tree_get_root(tree);
call_dissector(data_handle, payload_tvb, pinfo, root);
}