aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lapd.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-lapd.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-lapd.c')
-rw-r--r--epan/dissectors/packet-lapd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c
index 4b20412b8b..8e05a03a56 100644
--- a/epan/dissectors/packet-lapd.c
+++ b/epan/dissectors/packet-lapd.c
@@ -272,7 +272,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (ones == 5 && state == DATA) {
/* we don't increase bit_offset, it is an inserted zero */
} else if (ones == 6 && state == DATA) { /* probably starting flag sequence */
- buff = g_memdup(data, data_len);
+ buff = (guint8 *)g_memdup(data, data_len);
/* Allocate new tvb for the LAPD frame */
new_tvb = tvb_new_child_real_data(tvb, buff, data_len, data_len);
tvb_set_free_cb(new_tvb, g_free);
@@ -334,7 +334,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else { /* finished processing LAPD frame(s) */
if (NULL == p_get_proto_data(pinfo->fd, proto_lapd)) {
/* Per packet information */
- lapd_ppi = se_alloc(sizeof(lapd_ppi_t));
+ lapd_ppi = se_new(lapd_ppi_t);
lapd_ppi->has_crc = TRUE;
if (prev_byte_state)
fill_lapd_byte_state(&lapd_ppi->start_byte_state, prev_byte_state->state,
@@ -354,13 +354,13 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
fill_lapd_byte_state(convo_data->byte_state_a, state, full_byte, bit_offset, ones);
else {
if (!convo_data->byte_state_b)
- convo_data->byte_state_b = se_alloc(sizeof(lapd_byte_state_t));
+ convo_data->byte_state_b = se_new(lapd_byte_state_t);
fill_lapd_byte_state(convo_data->byte_state_b, state, full_byte, bit_offset, ones);
}
} else { /* lapd convo data has to be created */
- lapd_byte_state = se_alloc(sizeof(lapd_byte_state_t));
+ lapd_byte_state = se_new(lapd_byte_state_t);
fill_lapd_byte_state(lapd_byte_state, state, full_byte, bit_offset, ones);
- convo_data = se_alloc(sizeof(lapd_convo_data_t));
+ convo_data = se_new(lapd_convo_data_t);
COPY_ADDRESS(&convo_data->addr_a, &pinfo->src);
COPY_ADDRESS(&convo_data->addr_b, &pinfo->dst);
convo_data->port_a = pinfo->srcport;