aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-18 19:47:33 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-18 19:47:33 +0000
commit434aae5245f83f69bf3eb49ad34966c442117385 (patch)
treec019f96e779796615f7384e37d2dd01256216925 /ui
parenta4cb525bad04b057528d1035da74718a831e7b8a (diff)
From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48396
Diffstat (limited to 'ui')
-rw-r--r--ui/export_object_smb.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ui/export_object_smb.c b/ui/export_object_smb.c
index 2e15795a47..bd2752db8c 100644
--- a/ui/export_object_smb.c
+++ b/ui/export_object_smb.c
@@ -129,7 +129,7 @@ gpointer dest_memory_addr;
if ((file->data_gathered == 0) && (nfreechunks == 0)) {
/* If this is the first entry for this file, we first
create an initial free chunk */
- new_free_chunk = g_malloc(sizeof(free_chunk));
+ new_free_chunk = (free_chunk *)g_malloc(sizeof(free_chunk));
new_free_chunk->start_offset = 0;
new_free_chunk->end_offset = MAX(file->file_length, chunk_end_offset+1) - 1;
file->free_chunk_list = NULL;
@@ -137,7 +137,7 @@ gpointer dest_memory_addr;
nfreechunks += 1;
} else {
if (chunk_end_offset > file->file_length-1) {
- new_free_chunk = g_malloc(sizeof(free_chunk));
+ new_free_chunk = (free_chunk *)g_malloc(sizeof(free_chunk));
new_free_chunk->start_offset = file->file_length;
new_free_chunk->end_offset = chunk_end_offset;
file->free_chunk_list = g_slist_append(file->free_chunk_list, new_free_chunk);
@@ -148,7 +148,7 @@ gpointer dest_memory_addr;
/* Recalculate each free chunk according with the incoming data chunk */
for (i=0; i<nfreechunks; i++) {
- current_free_chunk = g_slist_nth_data(file->free_chunk_list, i);
+ current_free_chunk = (free_chunk *)g_slist_nth_data(file->free_chunk_list, i);
/* 1. data chunk before the free chunk? */
/* -> free chunk is not altered and no new data gathered */
if (chunk_end_offset<current_free_chunk->start_offset) {
@@ -178,7 +178,7 @@ gpointer dest_memory_addr;
/* 4. data chunk is inside the free chunk */
/* -> free chunk is splitted into two */
if (chunk_offset>current_free_chunk->start_offset && chunk_end_offset<current_free_chunk->end_offset) {
- new_free_chunk = g_malloc(sizeof(free_chunk));
+ new_free_chunk = (free_chunk *)g_malloc(sizeof(free_chunk));
new_free_chunk->start_offset = chunk_end_offset + 1;
new_free_chunk->end_offset = current_free_chunk->end_offset;
current_free_chunk->end_offset = chunk_offset-1;
@@ -214,7 +214,7 @@ gpointer dest_memory_addr;
*/
entry->payload_data = NULL;
} else {
- entry->payload_data = g_try_malloc((gsize)calculated_size);
+ entry->payload_data = (guint8 *)g_try_malloc((gsize)calculated_size);
entry->payload_len = calculated_size;
}
if (!entry->payload_data) {
@@ -246,7 +246,7 @@ gpointer dest_memory_addr;
entry->payload_data = NULL;
entry->payload_len = 0;
} else {
- entry->payload_data = dest_memory_addr;
+ entry->payload_data = (guint8 *)dest_memory_addr;
entry->payload_len = calculated_size;
}
}
@@ -271,7 +271,7 @@ find_incoming_file(GSList *GSL_active_files_p, active_file *incoming_file)
/* We lookup in reverse order because it is more likely that the file
is one of the latest */
for (i=last; i>=0; i--) {
- in_list_file = g_slist_nth_data(GSL_active_files_p, i);
+ in_list_file = (active_file *)g_slist_nth_data(GSL_active_files_p, i);
/* The best-working criteria of two identical files is that the file
that is the same of the file that we are analyzing is the last one
in the list that has the same tid and the same fid */
@@ -292,8 +292,8 @@ find_incoming_file(GSList *GSL_active_files_p, active_file *incoming_file)
gboolean
eo_smb_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
{
-export_object_list_t *object_list = tapdata;
-const smb_eo_t *eo_info = data;
+export_object_list_t *object_list = (export_object_list_t *)tapdata;
+const smb_eo_t *eo_info = (const smb_eo_t *)data;
export_object_entry_t *entry;
export_object_entry_t *current_entry;
@@ -354,10 +354,10 @@ gchar *aux_smb_fid_type_string;
if (active_row == -1) { /* This is a new-tracked file */
/* Construct the entry in the list of active files */
- entry = g_malloc(sizeof(export_object_entry_t));
+ entry = (export_object_entry_t *)g_malloc(sizeof(export_object_entry_t));
entry->payload_data = NULL;
entry->payload_len = 0;
- new_file = g_malloc(sizeof(active_file));
+ new_file = (active_file *)g_malloc(sizeof(active_file));
new_file->tid = incoming_file.tid;
new_file->uid = incoming_file.uid;
new_file->fid = incoming_file.fid;
@@ -403,7 +403,7 @@ gchar *aux_smb_fid_type_string;
GSL_active_files = g_slist_append(GSL_active_files, new_file);
}
else if (is_supported_filetype) {
- current_file = g_slist_nth_data(GSL_active_files, active_row);
+ current_file = (active_file *)g_slist_nth_data(GSL_active_files, active_row);
/* Recalculate the current file flags */
current_file->flag_contains = current_file->flag_contains|contains;
current_entry = object_list_get_entry(object_list, active_row);
@@ -448,7 +448,7 @@ active_file *in_list_file;
last = g_slist_length(GSL_active_files);
if (GSL_active_files) {
for (i=last-1; i>=0; i--) {
- in_list_file = g_slist_nth_data(GSL_active_files, i);
+ in_list_file = (active_file *)g_slist_nth_data(GSL_active_files, i);
if (in_list_file->free_chunk_list) {
g_slist_free(in_list_file->free_chunk_list);
in_list_file->free_chunk_list = NULL;