summaryrefslogtreecommitdiff
path: root/firmware
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 /firmware
parentddecf431e0793597c86456773291478579193ac2 (diff)
downloadrockbox-24aeac2a754aa310894d3d057e827983b597e4f8.tar.gz
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
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))
82 (void)drive; 82 (void)drive;
83#endif 83#endif
84 84
85 storage_read_sectors(IF_MD2(drive,) 0,1, &sector); 85 storage_read_sectors(IF_MD2(drive,) 0,1, sector);
86 /* check that the boot sector is initialized */ 86 /* check that the boot sector is initialized */
87 if ( (sector[510] != 0x55) || 87 if ( (sector[510] != 0x55) ||
88 (sector[511] != 0xaa)) { 88 (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)
647 file->dirty = true; 647 file->dirty = true;
648 } 648 }
649 else { 649 else {
650 rc = fat_readwrite(&(file->fatfile), 1, &(file->cache),false); 650 rc = fat_readwrite(&(file->fatfile), 1, file->cache,false);
651 if (rc < 1 ) { 651 if (rc < 1 ) {
652 DEBUGF("Failed caching sector\n"); 652 DEBUGF("Failed caching sector\n");
653 errno = EIO; 653 errno = EIO;
@@ -756,8 +756,7 @@ off_t lseek(int fd, off_t offset, int whence)
756 } 756 }
757 } 757 }
758 if ( sectoroffset ) { 758 if ( sectoroffset ) {
759 rc = fat_readwrite(&(file->fatfile), 1, 759 rc = fat_readwrite(&(file->fatfile), 1, file->cache ,false);
760 &(file->cache),false);
761 if ( rc < 0 ) { 760 if ( rc < 0 ) {
762 errno = EIO; 761 errno = EIO;
763 return rc * 10 - 6; 762 return rc * 10 - 6;