summaryrefslogtreecommitdiffstats
path: root/src/io_redir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-06-23 19:28:58 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-06-23 19:28:58 +0200
commitb849a82750086bdddd127c7d43dd0a7381b3c28e (patch)
treeb7d0fd90e7e93e34455f0c582b2193803bbce4e1 /src/io_redir.c
parent50a0862d48da7f0260524b17c3b33281a1b5dcc7 (diff)
Make the code less C++ hostile
Diffstat (limited to 'src/io_redir.c')
-rw-r--r--src/io_redir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/io_redir.c b/src/io_redir.c
index e0cdf41..006061a 100644
--- a/src/io_redir.c
+++ b/src/io_redir.c
@@ -62,8 +62,8 @@ int io_redir_add_redir(disk_t *disk_car, const uint64_t org_offset, const unsign
{
if(disk_car->read!=io_redir_read)
{
- struct info_io_redir*data=MALLOC(sizeof(*data));
- disk_t *old_disk_car=MALLOC(sizeof(*old_disk_car));
+ struct info_io_redir*data=(struct info_io_redir*)MALLOC(sizeof(*data));
+ disk_t *old_disk_car=(disk_t *)MALLOC(sizeof(*old_disk_car));
#ifdef DEBUG_IO_REDIR
log_trace("io_redir_add_redir: install functions org_offset=%llu, size=%u, new_offset=%llu, mem=%p\n",
(long long unsigned)org_offset,
@@ -82,7 +82,7 @@ int io_redir_add_redir(disk_t *disk_car, const uint64_t org_offset, const unsign
disk_car->clean=io_redir_clean;
}
{
- struct info_io_redir *data=disk_car->data;
+ struct info_io_redir *data=(struct info_io_redir *)disk_car->data;
list_redir_t *prev_redir=NULL;
list_redir_t *current_redir;
for(current_redir=data->list_redir;(current_redir!=NULL) && org_offset<current_redir->org_offset+current_redir->size;current_redir=current_redir->next)
@@ -120,7 +120,7 @@ int io_redir_del_redir(disk_t *disk_car, uint64_t org_offset)
return 1;
}
{
- struct info_io_redir *data=disk_car->data;
+ struct info_io_redir *data=(struct info_io_redir *)disk_car->data;
list_redir_t *current_redir;
for(current_redir=data->list_redir;(current_redir!=NULL) && org_offset!=current_redir->org_offset;current_redir=current_redir->next);
if(current_redir!=NULL)
@@ -153,7 +153,7 @@ int io_redir_del_redir(disk_t *disk_car, uint64_t org_offset)
static int io_redir_read(disk_t *disk_car,const unsigned int count, void *buffer, const uint64_t offset)
{
- struct info_io_redir *data=disk_car->data;
+ struct info_io_redir *data=(struct info_io_redir *)disk_car->data;
uint64_t current_offset=offset;
unsigned int current_count=count;
int res=0;
@@ -220,7 +220,7 @@ static int io_redir_clean(disk_t *disk_car)
{
if(disk_car->data)
{
- struct info_io_redir *data=disk_car->data;
+ struct info_io_redir *data=(struct info_io_redir *)disk_car->data;
data->disk_car->clean(data->disk_car);
free(data->disk_car);
free(disk_car->data);