From b7617b32eb7980af6af57409f1d97b2308e8838a Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Sun, 17 Mar 2013 22:16:39 +0000 Subject: From beroset: remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48383 --- epan/addr_resolv.c | 2 +- epan/dissectors/packet-mp2t.c | 28 ++++++++++---------- epan/dissectors/packet-rtcp.c | 26 +++++++++--------- epan/dissectors/packet-umts_mac.c | 24 ++++++++--------- epan/plugins.c | 16 +++++------ epan/tcap-persistentdata.c | 56 +++++++++++++++++++-------------------- 6 files changed, 76 insertions(+), 76 deletions(-) diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index be3282cb57..6148de24bf 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -1362,7 +1362,7 @@ add_manuf_name(const guint8 *addr, unsigned int mask, gchar *name) well-known-address table, creating that table if necessary. */ wka_tp = wka_table[mask]; if (wka_tp == NULL) - wka_tp = wka_table[mask] = se_alloc0(sizeof *wka_table[mask]); + wka_tp = wka_table[mask] = (hashwka_t *(*)[HASHETHSIZE])se_alloc0(sizeof *wka_table[mask]); hash_idx = hash_eth_wka(addr, mask); diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index 83b4171773..d5aa5027e7 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -344,7 +344,7 @@ init_mp2t_conversation_data(void) { mp2t_analysis_data_t *mp2t_data = NULL; - mp2t_data = se_alloc0(sizeof(struct mp2t_analysis_data)); + mp2t_data = se_new0(struct mp2t_analysis_data); mp2t_data->pid_table = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, @@ -364,7 +364,7 @@ get_mp2t_conversation_data(conversation_t *conv) { mp2t_analysis_data_t *mp2t_data = NULL; - mp2t_data = conversation_get_proto_data(conv, proto_mp2t); + mp2t_data = (mp2t_analysis_data_t *)conversation_get_proto_data(conv, proto_mp2t); if (!mp2t_data) { mp2t_data = init_mp2t_conversation_data(); conversation_add_proto_data(conv, proto_mp2t, mp2t_data); @@ -378,7 +378,7 @@ init_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo) { frame_analysis_data_t *frame_analysis_data_p = NULL; - frame_analysis_data_p = se_alloc0(sizeof(struct frame_analysis_data)); + frame_analysis_data_p = se_new0(struct frame_analysis_data); frame_analysis_data_p->ts_table = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "mp2t_frame_pid_table"); @@ -394,7 +394,7 @@ static frame_analysis_data_t * get_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo) { frame_analysis_data_t *frame_analysis_data_p = NULL; - frame_analysis_data_p = se_tree_lookup32(mp2t_data->frame_table, pinfo->fd->num); + frame_analysis_data_p = (frame_analysis_data_t *)se_tree_lookup32(mp2t_data->frame_table, pinfo->fd->num); return frame_analysis_data_p; } @@ -407,9 +407,9 @@ get_pid_analysis(guint32 pid, conversation_t *conv) mp2t_data = get_mp2t_conversation_data(conv); - pid_data = se_tree_lookup32(mp2t_data->pid_table, pid); + pid_data = (pid_analysis_data_t *)se_tree_lookup32(mp2t_data->pid_table, pid); if (!pid_data) { - pid_data = se_alloc0(sizeof(struct pid_analysis_data)); + pid_data = se_new0(struct pid_analysis_data); pid_data->cc_prev = -1; pid_data->pid = pid; pid_data->frag_id = (pid << (32 - 13)) | 0x1; @@ -636,18 +636,18 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len, frag_tot_len = pid_analysis->frag_tot_len; fragmentation = pid_analysis->fragmentation; frag_id = pid_analysis->frag_id; - pdata = p_get_proto_data(pinfo->fd, proto_mp2t); + pdata = (packed_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t); if (!pdata) { - pdata = se_alloc0(sizeof(packed_analysis_data_t)); + pdata = se_new0(packed_analysis_data_t); pdata->subpacket_table = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "mp2t_frame_table"); p_add_proto_data(pinfo->fd, proto_mp2t, pdata); } else { - spdata = se_tree_lookup32(pdata->subpacket_table, offset); + spdata = (subpacket_analysis_data_t *)se_tree_lookup32(pdata->subpacket_table, offset); } if (!spdata) { - spdata = se_alloc0(sizeof(subpacket_analysis_data_t)); + spdata = se_new0(subpacket_analysis_data_t); /* Save the info into pdata from pid_analysis */ spdata->frag_cur_pos = frag_cur_pos; spdata->frag_tot_len = frag_tot_len; @@ -659,13 +659,13 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len, } else { /* Get saved values */ - pdata = p_get_proto_data(pinfo->fd, proto_mp2t); + pdata = (packed_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t); if (!pdata) { /* Occurs for the first packets in the capture which cannot be reassembled */ return; } - spdata = se_tree_lookup32(pdata->subpacket_table, offset); + spdata = (subpacket_analysis_data_t *)se_tree_lookup32(pdata->subpacket_table, offset); if (!spdata) { /* Occurs for the first sub packets in the capture which cannot be reassembled */ return; @@ -891,7 +891,7 @@ detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /* Create and store a new TS frame pid_data object. This indicate that we have a drop */ - ts_data = se_alloc0(sizeof(struct ts_analysis_data)); + ts_data = se_new0(struct ts_analysis_data); ts_data->cc_prev = cc_prev; ts_data->pid = pid; ts_data->skips = skips; @@ -907,7 +907,7 @@ detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, if (!frame_analysis_data_p) return 0; /* No stored frame data -> no drops*/ else { - ts_data = se_tree_lookup32(frame_analysis_data_p->ts_table, + ts_data = (struct ts_analysis_data *)se_tree_lookup32(frame_analysis_data_p->ts_table, KEY(pid, cc_curr)); if (ts_data) { diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 5935fe6a6e..b43c864943 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -645,14 +645,14 @@ void srtcp_add_address( packet_info *pinfo, /* * Check if the conversation has data associated with it. */ - p_conv_data = conversation_get_proto_data(p_conv, proto_rtcp); + p_conv_data = (struct _rtcp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtcp); /* * If not, add a new data item. */ if ( ! p_conv_data ) { /* Create conversation data */ - p_conv_data = se_alloc0(sizeof(struct _rtcp_conversation_info)); + p_conv_data = se_new0(struct _rtcp_conversation_info); conversation_add_proto_data(p_conv, proto_rtcp, p_conv_data); } @@ -2489,7 +2489,7 @@ void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) struct _rtcp_conversation_info *p_conv_data; /* Use existing packet data if available */ - p_conv_data = p_get_proto_data(pinfo->fd, proto_rtcp); + p_conv_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp); if (!p_conv_data) { @@ -2503,12 +2503,12 @@ void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* Look for data in conversation */ struct _rtcp_conversation_info *p_conv_packet_data; - p_conv_data = conversation_get_proto_data(p_conv, proto_rtcp); + p_conv_data = (struct _rtcp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtcp); if (p_conv_data) { /* Save this conversation info into packet info */ - p_conv_packet_data = se_memdup(p_conv_data, + p_conv_packet_data = (struct _rtcp_conversation_info *)se_memdup(p_conv_data, sizeof(struct _rtcp_conversation_info)); p_add_proto_data(pinfo->fd, proto_rtcp, p_conv_packet_data); @@ -2558,7 +2558,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr) /* First of all, see if we've already stored this information for this sr */ /* Look first in packet info */ - p_packet_data = p_get_proto_data(pinfo->fd, proto_rtcp); + p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp); if (p_packet_data && p_packet_data->last_received_set && (p_packet_data->last_received_frame_number >= pinfo->fd->num)) { @@ -2593,11 +2593,11 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr) /****************************************************/ /* Now find/create conversation data */ - p_conv_data = conversation_get_proto_data(p_conv, proto_rtcp); + p_conv_data = (struct _rtcp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtcp); if (!p_conv_data) { /* Allocate memory for data */ - p_conv_data = se_alloc0(sizeof(struct _rtcp_conversation_info)); + p_conv_data = se_new0(struct _rtcp_conversation_info); /* Add it to conversation. */ conversation_add_proto_data(p_conv, proto_rtcp, p_conv_data); @@ -2617,7 +2617,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr) /* Will use/create packet info */ if (!p_packet_data) { - p_packet_data = se_alloc0(sizeof(struct _rtcp_conversation_info)); + p_packet_data = se_new0(struct _rtcp_conversation_info); p_add_proto_data(pinfo->fd, proto_rtcp, p_packet_data); } @@ -2650,7 +2650,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo, /*************************************************/ /* Look for previous result */ - p_packet_data = p_get_proto_data(pinfo->fd, proto_rtcp); + p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp); if (p_packet_data && p_packet_data->lsr_matched) { /* Show info. */ @@ -2674,7 +2674,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo, } /* Look for conversation data */ - p_conv_data = conversation_get_proto_data(p_conv, proto_rtcp); + p_conv_data = (struct _rtcp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtcp); if (!p_conv_data) { return; @@ -2686,7 +2686,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo, if (!p_packet_data) { /* Create packet info if it doesn't exist */ - p_packet_data = se_alloc0(sizeof(struct _rtcp_conversation_info)); + p_packet_data = se_new0(struct _rtcp_conversation_info); /* Set as packet info */ p_add_proto_data(pinfo->fd, proto_rtcp, p_packet_data); @@ -2831,7 +2831,7 @@ dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) if (p_conv) { struct _rtcp_conversation_info *p_conv_data; - p_conv_data = conversation_get_proto_data(p_conv, proto_rtcp); + p_conv_data = (struct _rtcp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtcp); if (p_conv_data && p_conv_data->srtcp_info) { gboolean e_bit; diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c index 3767e95414..33bbf1d121 100644 --- a/epan/dissectors/packet-umts_mac.c +++ b/epan/dissectors/packet-umts_mac.c @@ -127,23 +127,23 @@ static GHashTable * mac_is_sdus = NULL; /* channel -> (frag -> sdu) */ static GHashTable * mac_is_fragments = NULL; /* channel -> body_parts[] */ static gboolean mac_is_channel_equal(gconstpointer a, gconstpointer b) { - const mac_is_channel *x = a, *y = b; + const mac_is_channel *x = (const mac_is_channel *)a, *y = (const mac_is_channel *)b; return x->lchid == y->lchid && x->ueid == y->ueid; } static guint mac_is_channel_hash(gconstpointer key) { - const mac_is_channel * ch = key; + const mac_is_channel * ch = (const mac_is_channel *)key; return (ch->ueid << 4) | ch->lchid; } static gboolean mac_is_fragment_equal(gconstpointer a, gconstpointer b) { - const mac_is_fragment *x = a, *y = b; + const mac_is_fragment *x = (const mac_is_fragment *)a, *y = (const mac_is_fragment *)b; return x->frame_num == y->frame_num && x->tsn == y->tsn && x->type == y->type; } static guint mac_is_fragment_hash(gconstpointer key) { - const mac_is_fragment *frag = key; + const mac_is_fragment *frag = (const mac_is_fragment *)key; return (frag->frame_num << 2) | frag->type; } @@ -462,9 +462,9 @@ static void dissect_mac_fdd_fach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * add_new_data_source(pinfo, next_tvb, "Octet-Aligned BCCH Data"); /* In this case skip RLC and call RRC immediately subdissector */ - rrcinf = p_get_proto_data(pinfo->fd, proto_rrc); + rrcinf = (rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc); if (!rrcinf) { - rrcinf = se_alloc0(sizeof(struct rrc_info)); + rrcinf = se_new0(struct rrc_info); p_add_proto_data(pinfo->fd, proto_rrc, rrcinf); } rrcinf->msgtype[fpinf->cur_tb] = RRC_MESSAGE_TYPE_BCCH_FACH; @@ -607,7 +607,7 @@ static void init_frag(tvbuff_t * tvb, body_parts * bp, guint length, guint offse mac_is_fragment * frag = se_new(mac_is_fragment); frag->type = type; frag->length = length; - frag->data = g_malloc(length); + frag->data = (guint8 *)g_malloc(length); frag->frame_num = frame_num; frag->tsn = tsn; frag->next = NULL; @@ -651,7 +651,7 @@ static tvbuff_t * reassemble(tvbuff_t * tvb, body_parts ** body_parts_array, gui GHashTable * sdus; /* Find frag->sdu hash table for this channel. */ - sdus = g_hash_table_lookup(mac_is_sdus, ch); + sdus = (GHashTable *)g_hash_table_lookup(mac_is_sdus, ch); /* If this is the first time we see this channel. */ if (sdus == NULL) { mac_is_channel * channel; @@ -663,7 +663,7 @@ static tvbuff_t * reassemble(tvbuff_t * tvb, body_parts ** body_parts_array, gui sdu = se_new(mac_is_sdu); sdu->length = 0; - sdu->data = se_alloc(length); + sdu->data = (guint8 *)se_alloc(length); f = body_parts_array[head_tsn]->head; /* Start from head. */ g_hash_table_insert(sdus, f, sdu); /* Insert head->sdu mapping. */ @@ -696,12 +696,12 @@ static mac_is_sdu * get_sdu(guint frame_num, guint16 tsn, guint8 type, mac_is_ch GHashTable * sdus = NULL; mac_is_fragment frag_lookup_key; - sdus = g_hash_table_lookup(mac_is_sdus, ch); + sdus = (GHashTable *)g_hash_table_lookup(mac_is_sdus, ch); if (sdus) { frag_lookup_key.frame_num = frame_num; frag_lookup_key.tsn = tsn; frag_lookup_key.type = type; - sdu = g_hash_table_lookup(sdus, &frag_lookup_key); + sdu = (mac_is_sdu *)g_hash_table_lookup(sdus, &frag_lookup_key); return sdu; } return NULL; @@ -780,7 +780,7 @@ static guint find_tail(body_parts ** body_parts_array, guint16 tsn) */ static body_parts ** get_body_parts(mac_is_channel * ch) { - body_parts ** bpa = g_hash_table_lookup(mac_is_fragments, ch); + body_parts ** bpa = (body_parts **)g_hash_table_lookup(mac_is_fragments, ch); /* If there was no body_part* array for this channel, create one. */ if (bpa == NULL) { mac_is_channel * channel; diff --git a/epan/plugins.c b/epan/plugins.c index 57c8ea2d0c..47f6aee292 100644 --- a/epan/plugins.c +++ b/epan/plugins.c @@ -109,7 +109,7 @@ add_plugin(void *handle, gchar *name, gchar *version, pt_plug->next = new_plug; } - new_plug->handle = handle; + new_plug->handle = (GModule *)handle; new_plug->name = name; new_plug->version = version; new_plug->register_protoinfo = register_protoinfo; @@ -172,7 +172,7 @@ plugins_scan_dir(const char *dirname) g_snprintf(filename, FILENAME_LEN, "%s" G_DIR_SEPARATOR_S "%s", dirname, name); - if ((handle = g_module_open(filename, 0)) == NULL) + if ((handle = g_module_open(filename, (GModuleFlags)0)) == NULL) { report_failure("Couldn't load module %s: %s", filename, g_module_error()); @@ -185,7 +185,7 @@ plugins_scan_dir(const char *dirname) g_module_close(handle); continue; } - version = gp; + version = (char *)gp; /* * Do we have a register routine? @@ -195,7 +195,7 @@ plugins_scan_dir(const char *dirname) /* * Yes - this plugin includes one or more dissectors. */ - register_protoinfo = gp; + register_protoinfo = (void (*)(void))gp; } else { @@ -213,7 +213,7 @@ plugins_scan_dir(const char *dirname) /* * Yes. */ - reg_handoff = gp; + reg_handoff = (void (*)(void))gp; } else { @@ -233,7 +233,7 @@ plugins_scan_dir(const char *dirname) /* * Yes - this plugin includes one or more taps. */ - register_tap_listener = gp; + register_tap_listener = (void (*)(void))gp; } else { @@ -275,7 +275,7 @@ plugins_scan_dir(const char *dirname) */ if (g_module_symbol(handle, "register_wtap_module", &gp)) { - register_wtap_module = gp; + register_wtap_module = (void (*)(void))gp; } else { @@ -287,7 +287,7 @@ plugins_scan_dir(const char *dirname) */ if (g_module_symbol(handle, "register_codec_module", &gp)) { - register_codec_module = gp; + register_codec_module = (void (*)(void))gp; } else { diff --git a/epan/tcap-persistentdata.c b/epan/tcap-persistentdata.c index 7312fe5600..9f9c2bb6dc 100644 --- a/epan/tcap-persistentdata.c +++ b/epan/tcap-persistentdata.c @@ -327,9 +327,9 @@ append_tcaphash_begincall(struct tcaphash_begincall_t *prev_begincall, This should append when the tcap-transaction Id is reused */ #ifdef MEM_TCAPSRT - p_new_tcaphash_begincall = g_malloc0(sizeof(struct tcaphash_begincall_t)); + p_new_tcaphash_begincall = (struct tcaphash_begincall_t *)g_malloc0(sizeof(struct tcaphash_begincall_t)); #else - p_new_tcaphash_begincall = se_alloc0(sizeof(struct tcaphash_begincall_t)); + p_new_tcaphash_begincall = se_new0(struct tcaphash_begincall_t); #endif p_new_tcaphash_begincall->context=p_tcaphash_context; p_tcaphash_context->begincall=p_new_tcaphash_begincall; @@ -381,9 +381,9 @@ append_tcaphash_ansicall(struct tcaphash_ansicall_t *prev_ansicall, This should append when the tcap-transaction Id is reused */ #ifdef MEM_TCAPSRT - p_new_tcaphash_ansicall = g_malloc0(sizeof(struct tcaphash_ansicall_t)); + p_new_tcaphash_ansicall = (struct tcaphash_ansicall_t *)g_malloc0(sizeof(struct tcaphash_ansicall_t)); #else - p_new_tcaphash_ansicall = se_alloc0(sizeof(struct tcaphash_ansicall_t)); + p_new_tcaphash_ansicall = se_new0(struct tcaphash_ansicall_t); #endif p_new_tcaphash_ansicall->context=p_tcaphash_context; p_tcaphash_context->ansicall=p_new_tcaphash_ansicall; @@ -418,9 +418,9 @@ append_tcaphash_contcall(struct tcaphash_contcall_t *prev_contcall, This should append when the tcap-transaction Id is reused */ #ifdef MEM_TCAPSRT - p_new_tcaphash_contcall = g_malloc0(sizeof(struct tcaphash_contcall_t)); + p_new_tcaphash_contcall = (struct tcaphash_contcall_t *)g_malloc0(sizeof(struct tcaphash_contcall_t)); #else - p_new_tcaphash_contcall = se_alloc0(sizeof(struct tcaphash_contcall_t)); + p_new_tcaphash_contcall = se_new0(struct tcaphash_contcall_t); #endif p_new_tcaphash_contcall->context=p_tcaphash_context; p_tcaphash_context->contcall=p_new_tcaphash_contcall; @@ -448,9 +448,9 @@ append_tcaphash_endcall(struct tcaphash_endcall_t *prev_endcall, This should append when the tcap-transaction Id is reused */ #ifdef MEM_TCAPSRT - p_new_tcaphash_endcall = g_malloc0(sizeof(struct tcaphash_endcall_t)); + p_new_tcaphash_endcall = (struct tcaphas_endcall_t *)g_malloc0(sizeof(struct tcaphash_endcall_t)); #else - p_new_tcaphash_endcall = se_alloc0(sizeof(struct tcaphash_endcall_t)); + p_new_tcaphash_endcall = se_new0(struct tcaphash_endcall_t); #endif p_new_tcaphash_endcall->context=p_tcaphash_context; p_tcaphash_context->endcall=p_new_tcaphash_endcall; @@ -618,16 +618,16 @@ new_tcaphash_context(struct tcaphash_context_key_t *p_tcaphash_context_key, Once created, this entry will be updated later */ #ifdef MEM_TCAPSRT - p_new_tcaphash_context_key = g_malloc(sizeof(struct tcaphash_context_key_t)); + p_new_tcaphash_context_key = (struct tcaphash_context_key_t *)g_malloc(sizeof(struct tcaphash_context_key_t)); #else - p_new_tcaphash_context_key = se_alloc(sizeof(struct tcaphash_context_key_t)); + p_new_tcaphash_context_key = se_new(struct tcaphash_context_key_t); #endif p_new_tcaphash_context_key->session_id = p_tcaphash_context_key->session_id; #ifdef MEM_TCAPSRT - p_new_tcaphash_context = g_malloc0(sizeof(struct tcaphash_context_t)); + p_new_tcaphash_context = (struct tcaphash_context_t *)g_malloc0(sizeof(struct tcaphash_context_t)); #else - p_new_tcaphash_context = se_alloc0(sizeof(struct tcaphash_context_t)); + p_new_tcaphash_context = se_new0(struct tcaphash_context_t); #endif p_new_tcaphash_context->key = p_new_tcaphash_context_key; p_new_tcaphash_context->session_id = p_tcaphash_context_key->session_id; @@ -655,9 +655,9 @@ new_tcaphash_begin(struct tcaphash_begin_info_key_t *p_tcaphash_begin_key, Once created, this entry will be updated later */ #ifdef MEM_TCAPSRT - p_new_tcaphash_begin_key = g_malloc(sizeof(struct tcaphash_begin_info_key_t)); + p_new_tcaphash_begin_key = (struct tcaphash_begin_info_key_t *)g_malloc(sizeof(struct tcaphash_begin_info_key_t)); #else - p_new_tcaphash_begin_key = se_alloc(sizeof(struct tcaphash_begin_info_key_t)); + p_new_tcaphash_begin_key = se_new(struct tcaphash_begin_info_key_t); #endif p_new_tcaphash_begin_key->hashKey = p_tcaphash_begin_key->hashKey; p_new_tcaphash_begin_key->tid = p_tcaphash_begin_key->tid; @@ -665,9 +665,9 @@ new_tcaphash_begin(struct tcaphash_begin_info_key_t *p_tcaphash_begin_key, p_new_tcaphash_begin_key->dpc_hash = p_tcaphash_begin_key->dpc_hash; #ifdef MEM_TCAPSRT - p_new_tcaphash_begincall = g_malloc0(sizeof(struct tcaphash_begincall_t)); + p_new_tcaphash_begincall = (struct tcaphash_begincall_t *)g_malloc0(sizeof(struct tcaphash_begincall_t)); #else - p_new_tcaphash_begincall = se_alloc0(sizeof(struct tcaphash_begincall_t)); + p_new_tcaphash_begincall = se_new0(struct tcaphash_begincall_t); #endif p_new_tcaphash_begincall->beginkey=p_new_tcaphash_begin_key; p_new_tcaphash_begincall->context=p_tcaphash_context; @@ -701,9 +701,9 @@ new_tcaphash_cont(struct tcaphash_cont_info_key_t *p_tcaphash_cont_key, Once created, this entry will be updated later */ #ifdef MEM_TCAPSRT - p_new_tcaphash_cont_key = g_malloc(sizeof(struct tcaphash_cont_info_key_t)); + p_new_tcaphash_cont_key = (struct tcaphash_cont_info_key_t *)g_malloc(sizeof(struct tcaphash_cont_info_key_t)); #else - p_new_tcaphash_cont_key = se_alloc(sizeof(struct tcaphash_cont_info_key_t)); + p_new_tcaphash_cont_key = se_new(struct tcaphash_cont_info_key_t); #endif p_new_tcaphash_cont_key->hashKey = p_tcaphash_cont_key->hashKey; p_new_tcaphash_cont_key->src_tid = p_tcaphash_cont_key->src_tid; @@ -712,9 +712,9 @@ new_tcaphash_cont(struct tcaphash_cont_info_key_t *p_tcaphash_cont_key, p_new_tcaphash_cont_key->dpc_hash = p_tcaphash_cont_key->dpc_hash; #ifdef MEM_TCAPSRT - p_new_tcaphash_contcall = g_malloc0(sizeof(struct tcaphash_contcall_t)); + p_new_tcaphash_contcall = (struct tcaphash_contcall_t *)g_malloc0(sizeof(struct tcaphash_contcall_t)); #else - p_new_tcaphash_contcall = se_alloc0(sizeof(struct tcaphash_contcall_t)); + p_new_tcaphash_contcall = se_new0(struct tcaphash_contcall_t); #endif p_new_tcaphash_contcall->contkey=p_new_tcaphash_cont_key; p_new_tcaphash_contcall->context=p_tcaphash_context; @@ -747,9 +747,9 @@ new_tcaphash_end(struct tcaphash_end_info_key_t *p_tcaphash_end_key, Once created, this entry will be updated later */ #ifdef MEM_TCAPSRT - p_new_tcaphash_end_key = g_malloc(sizeof(struct tcaphash_end_info_key_t)); + p_new_tcaphash_end_key = (struct tcaphash_end_info_key_t *)g_malloc(sizeof(struct tcaphash_end_info_key_t)); #else - p_new_tcaphash_end_key = se_alloc(sizeof(struct tcaphash_end_info_key_t)); + p_new_tcaphash_end_key = se_new(struct tcaphash_end_info_key_t); #endif p_new_tcaphash_end_key->hashKey = p_tcaphash_end_key->hashKey; p_new_tcaphash_end_key->tid = p_tcaphash_end_key->tid; @@ -757,9 +757,9 @@ new_tcaphash_end(struct tcaphash_end_info_key_t *p_tcaphash_end_key, p_new_tcaphash_end_key->dpc_hash = p_tcaphash_end_key->dpc_hash; #ifdef MEM_TCAPSRT - p_new_tcaphash_endcall = g_malloc0(sizeof(struct tcaphash_endcall_t)); + p_new_tcaphash_endcall = (struct tcaphash_endcall_t *)g_malloc0(sizeof(struct tcaphash_endcall_t)); #else - p_new_tcaphash_endcall = se_alloc0(sizeof(struct tcaphash_endcall_t)); + p_new_tcaphash_endcall = se_new0(struct tcaphash_endcall_t); #endif p_new_tcaphash_endcall->endkey=p_new_tcaphash_end_key; p_new_tcaphash_endcall->context=p_tcaphash_context; @@ -790,9 +790,9 @@ new_tcaphash_ansi(struct tcaphash_ansi_info_key_t *p_tcaphash_ansi_key, Once created, this entry will be updated later */ #ifdef MEM_TCAPSRT - p_new_tcaphash_ansi_key = g_malloc(sizeof(struct tcaphash_ansi_info_key_t)); + p_new_tcaphash_ansi_key = (struct tcaphash_ansi_info_key_t *)g_malloc(sizeof(struct tcaphash_ansi_info_key_t)); #else - p_new_tcaphash_ansi_key = se_alloc(sizeof(struct tcaphash_ansi_info_key_t)); + p_new_tcaphash_ansi_key = se_new(struct tcaphash_ansi_info_key_t); #endif p_new_tcaphash_ansi_key->hashKey = p_tcaphash_ansi_key->hashKey; p_new_tcaphash_ansi_key->tid = p_tcaphash_ansi_key->tid; @@ -800,9 +800,9 @@ new_tcaphash_ansi(struct tcaphash_ansi_info_key_t *p_tcaphash_ansi_key, p_new_tcaphash_ansi_key->dpc_hash = p_tcaphash_ansi_key->dpc_hash; #ifdef MEM_TCAPSRT - p_new_tcaphash_ansicall = g_malloc0(sizeof(struct tcaphash_ansicall_t)); + p_new_tcaphash_ansicall = (struct tcaphash_ansicall_t *)g_malloc0(sizeof(struct tcaphash_ansicall_t)); #else - p_new_tcaphash_ansicall = se_alloc0(sizeof(struct tcaphash_ansicall_t)); + p_new_tcaphash_ansicall = se_new0(struct tcaphash_ansicall_t); #endif p_new_tcaphash_ansicall->ansikey=p_new_tcaphash_ansi_key; p_new_tcaphash_ansicall->context=p_tcaphash_context; -- cgit v1.2.3