summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-20 12:59:12 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-20 12:59:12 +0000
commit24aeac2a754aa310894d3d057e827983b597e4f8 (patch)
treec8b0957722f9a3d9dcdf2b336884fccccdbccca3
parentddecf431e0793597c86456773291478579193ac2 (diff)
downloadrockbox-24aeac2a754aa310894d3d057e827983b597e4f8.tar.gz
rockbox-24aeac2a754aa310894d3d057e827983b597e4f8.tar.bz2
rockbox-24aeac2a754aa310894d3d057e827983b597e4f8.zip
disk/file: Do not use & on arrays
it might be valid C but is confusing, and not consistent with the rest of file.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26191 a1c6a512-1295-4272-9138-f99709370657
-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;