summaryrefslogtreecommitdiffstats
path: root/src/fat.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.c
parent50a0862d48da7f0260524b17c3b33281a1b5dcc7 (diff)
Make the code less C++ hostile
Diffstat (limited to 'src/fat.c')
-rw-r--r--src/fat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fat.c b/src/fat.c
index 16827d9..3eca20c 100644
--- a/src/fat.c
+++ b/src/fat.c
@@ -281,7 +281,7 @@ int log_fat2_info(const struct fat_boot_sector*fh1, const struct fat_boot_sector
int check_FAT(disk_t *disk_car,partition_t *partition,const int verbose)
{
unsigned char *buffer;
- buffer=MALLOC(3*disk_car->sector_size);
+ buffer=(unsigned char *)MALLOC(3*disk_car->sector_size);
if(disk_car->read(disk_car,3*disk_car->sector_size, buffer, partition->part_offset)!=0)
{
screen_buffer_add("check_FAT: can't read FAT boot sector\n");
@@ -481,7 +481,7 @@ unsigned int fat32_get_prev_cluster(disk_t *disk_car,const partition_t *partitio
const uint32_t *p32;
uint64_t hd_offset=partition->part_offset+(uint64_t)fat_offset*disk_car->sector_size;
unsigned int prev_cluster;
- unsigned char *buffer=MALLOC(disk_car->sector_size);
+ unsigned char *buffer=(unsigned char *)MALLOC(disk_car->sector_size);
p32=(const uint32_t*)buffer;
for(prev_cluster=2;prev_cluster<=no_of_cluster+1;prev_cluster++)