aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mbtcp.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-19 19:28:57 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-19 19:28:57 +0000
commit3eb06be97d520daef0bad19bf9c261b01abdc66d (patch)
tree521ce26d4bc68c8e4158df7aa2af769ba60e93b9 /epan/dissectors/packet-mbtcp.c
parent089dfcd1085ac242322b8e90845ad9913ac7fcd3 (diff)
From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
Diffstat (limited to 'epan/dissectors/packet-mbtcp.c')
-rw-r--r--epan/dissectors/packet-mbtcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c
index e67dd75e74..a3f0dbf49b 100644
--- a/epan/dissectors/packet-mbtcp.c
+++ b/epan/dissectors/packet-mbtcp.c
@@ -457,7 +457,7 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_remove_proto_data(pinfo->fd, proto_modbus);
/* Create enough context for Modbus dissector */
- request_info = ep_alloc(sizeof(modbus_request_info_t));
+ request_info = ep_new(modbus_request_info_t);
request_info->packet_type = (guint8)packet_type;
request_info->register_addr_type = (guint8)global_mbus_tcp_register_addr_type;
request_info->register_format = (guint8)global_mbus_tcp_register_format;
@@ -601,7 +601,7 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_remove_proto_data(pinfo->fd, proto_modbus);
/* Create enough context for Modbus dissector */
- request_info = ep_alloc(sizeof(modbus_request_info_t));
+ request_info = ep_new(modbus_request_info_t);
request_info->packet_type = (guint8)packet_type;
request_info->register_addr_type = (guint8)global_mbus_rtu_register_addr_type;
request_info->register_format = (guint8)global_mbus_rtu_register_format;
@@ -840,7 +840,7 @@ dissect_modbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
}
/* See if we have any context */
- request_info = p_get_proto_data( pinfo->fd, proto_modbus );
+ request_info = (modbus_request_info_t *)p_get_proto_data( pinfo->fd, proto_modbus );
if (request_info != NULL)
{
packet_type = request_info->packet_type;