summaryrefslogtreecommitdiffstats
path: root/src/fat_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/fat_dir.c
parent50a0862d48da7f0260524b17c3b33281a1b5dcc7 (diff)
Make the code less C++ hostile
Diffstat (limited to 'src/fat_dir.c')
-rw-r--r--src/fat_dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fat_dir.c b/src/fat_dir.c
index 69108f7..14e93eb 100644
--- a/src/fat_dir.c
+++ b/src/fat_dir.c
@@ -257,7 +257,7 @@ RecEnd:
if((int8_t) unicode[0] != (int8_t) DELETED_FLAG)
{
unsigned int i;
- file_data_t *new_file=MALLOC(sizeof(*new_file));
+ file_data_t *new_file=(file_data_t *)MALLOC(sizeof(*new_file));
for(i=0;(unicode[i]!=0)&&(i<sizeof(new_file->name)-1);i++)
new_file->name[i]=(char) unicode[i];
new_file->name[i]=0;
@@ -358,7 +358,7 @@ static file_data_t *fat_dir(disk_t *disk_car, const partition_t *partition, dir_
{
file_data_t *dir_list=NULL;
const unsigned int cluster_size=fat_header->cluster_size;
- unsigned char *buffer_dir=MALLOC(fat_sector_size(fat_header)*cluster_size*10);
+ unsigned char *buffer_dir=(unsigned char *)MALLOC(fat_sector_size(fat_header)*cluster_size*10);
unsigned int nbr_cluster;
int stop=0;
uint64_t start_fat1,start_data,part_size;
@@ -517,7 +517,7 @@ static int fat_copy(disk_t *disk_car, const partition_t *partition, dir_data_t *
const struct fat_boot_sector *fat_header=ls->boot_sector;
unsigned int cluster_size=fat_header->cluster_size;
const unsigned int block_size=fat_sector_size(fat_header)*cluster_size;
- unsigned char *buffer_file=MALLOC(block_size);
+ unsigned char *buffer_file=(unsigned char *)MALLOC(block_size);
unsigned int cluster;
unsigned int file_size=file->filestat.st_size;
unsigned int fat_meth=FAT_FOLLOW_CLUSTER;