summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/common/disk.c2
-rw-r--r--firmware/common/file.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c
index f8efe1c88b..5ef41bc296 100644
--- a/firmware/common/disk.c
+++ b/firmware/common/disk.c
@@ -82,7 +82,7 @@ struct partinfo* disk_init(IF_MD_NONVOID(int drive))
(void)drive;
#endif
- storage_read_sectors(IF_MD2(drive,) 0,1, &sector);
+ storage_read_sectors(IF_MD2(drive,) 0,1, sector);
/* check that the boot sector is initialized */
if ( (sector[510] != 0x55) ||
(sector[511] != 0xaa)) {
diff --git a/firmware/common/file.c b/firmware/common/file.c
index 438a7106ca..6beec9f606 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -647,7 +647,7 @@ static int readwrite(int fd, void* buf, long count, bool write)
file->dirty = true;
}
else {
- rc = fat_readwrite(&(file->fatfile), 1, &(file->cache),false);
+ rc = fat_readwrite(&(file->fatfile), 1, file->cache,false);
if (rc < 1 ) {
DEBUGF("Failed caching sector\n");
errno = EIO;
@@ -756,8 +756,7 @@ off_t lseek(int fd, off_t offset, int whence)
}
}
if ( sectoroffset ) {
- rc = fat_readwrite(&(file->fatfile), 1,
- &(file->cache),false);
+ rc = fat_readwrite(&(file->fatfile), 1, file->cache ,false);
if ( rc < 0 ) {
errno = EIO;
return rc * 10 - 6;