summaryrefslogtreecommitdiffstats
path: root/src/ntfs_dir.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/ntfs_dir.c
parent50a0862d48da7f0260524b17c3b33281a1b5dcc7 (diff)
Make the code less C++ hostile
Diffstat (limited to 'src/ntfs_dir.c')
-rw-r--r--src/ntfs_dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ntfs_dir.c b/src/ntfs_dir.c
index 4ec2843..f0e3b55 100644
--- a/src/ntfs_dir.c
+++ b/src/ntfs_dir.c
@@ -241,7 +241,7 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
}
{
- file_data_t *new_file=MALLOC(sizeof(*new_file));
+ file_data_t *new_file=(file_data_t *)MALLOC(sizeof(*new_file));
memcpy(new_file->name,filename,(MAX_PATH<sizeof(new_file->name)?MAX_PATH:sizeof(new_file->name)));
new_file->status=0;
new_file->prev=ls->current_file;
@@ -338,7 +338,7 @@ static int ntfs_copy(disk_t *disk_car, const partition_t *partition, dir_data_t
s64 bytes_read, written;
s64 offset;
u32 block_size;
- buffer = MALLOC(bufsize);
+ buffer = (char *)MALLOC(bufsize);
if (!buffer)
return -2;
attr = ntfs_attr_open(inode, AT_DATA, NULL, 0);
@@ -431,7 +431,7 @@ int dir_partition_ntfs_init(disk_t *disk_car, const partition_t *partition, dir_
dev = ntfs_device_alloc("/", 0, &ntfs_device_testdisk_io_ops, NULL);
if (dev)
{
- my_data=MALLOC(sizeof(*my_data));
+ my_data=(my_data_t *)MALLOC(sizeof(*my_data));
my_data->partition=partition;
my_data->disk_car=disk_car;
my_data->offset=0;