forked from len0rd/rockbox
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
This commit is contained in:
parent
ddecf431e0
commit
24aeac2a75
2 changed files with 3 additions and 4 deletions
|
|
@ -82,7 +82,7 @@ struct partinfo* disk_init(IF_MD_NONVOID(int drive))
|
||||||
(void)drive;
|
(void)drive;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
storage_read_sectors(IF_MD2(drive,) 0,1, §or);
|
storage_read_sectors(IF_MD2(drive,) 0,1, sector);
|
||||||
/* check that the boot sector is initialized */
|
/* check that the boot sector is initialized */
|
||||||
if ( (sector[510] != 0x55) ||
|
if ( (sector[510] != 0x55) ||
|
||||||
(sector[511] != 0xaa)) {
|
(sector[511] != 0xaa)) {
|
||||||
|
|
|
||||||
|
|
@ -647,7 +647,7 @@ static int readwrite(int fd, void* buf, long count, bool write)
|
||||||
file->dirty = true;
|
file->dirty = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rc = fat_readwrite(&(file->fatfile), 1, &(file->cache),false);
|
rc = fat_readwrite(&(file->fatfile), 1, file->cache,false);
|
||||||
if (rc < 1 ) {
|
if (rc < 1 ) {
|
||||||
DEBUGF("Failed caching sector\n");
|
DEBUGF("Failed caching sector\n");
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
|
|
@ -756,8 +756,7 @@ off_t lseek(int fd, off_t offset, int whence)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( sectoroffset ) {
|
if ( sectoroffset ) {
|
||||||
rc = fat_readwrite(&(file->fatfile), 1,
|
rc = fat_readwrite(&(file->fatfile), 1, file->cache ,false);
|
||||||
&(file->cache),false);
|
|
||||||
if ( rc < 0 ) {
|
if ( rc < 0 ) {
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
return rc * 10 - 6;
|
return rc * 10 - 6;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue