summaryrefslogtreecommitdiff
path: root/firmware/common/file.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-04-26 10:29:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-04-26 10:29:41 +0000
commit50798120310938cd61d19fdb943a3c654f846a9f (patch)
tree9e99aae71ac3c4ff40cdd3e81ce61e8a8a02b2a4 /firmware/common/file.c
parent52ba1c614dfe92e734747f74237e8840912607e8 (diff)
avoid declaring shadow 'rc' variables (-Wshadow!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13270 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/file.c')
-rw-r--r--firmware/common/file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c
index 830a7eef8a..bc57d556b3 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -501,7 +501,7 @@ static int readwrite(int fd, void* buf, long count, bool write)
if (offs + headbytes == SECTOR_SIZE) {
if (file->dirty) {
- int rc = flush_cache(fd);
+ rc = flush_cache(fd);
if ( rc < 0 ) {
errno = EIO;
return rc * 10 - 2;
@@ -524,7 +524,7 @@ static int readwrite(int fd, void* buf, long count, bool write)
/* read/write whole sectors right into/from the supplied buffer */
sectors = count / SECTOR_SIZE;
if ( sectors ) {
- int rc = fat_readwrite(&(file->fatfile), sectors,
+ rc = fat_readwrite(&(file->fatfile), sectors,
(unsigned char*)buf+nread, write );
if ( rc < 0 ) {
DEBUGF("Failed read/writing %ld sectors\n",sectors);
@@ -561,7 +561,6 @@ static int readwrite(int fd, void* buf, long count, bool write)
if (write) {
if ( file->fileoffset + nread < file->size ) {
/* sector is only partially filled. copy-back from disk */
- int rc;
LDEBUGF("Copy-back tail cache\n");
rc = fat_readwrite(&(file->fatfile), 1, file->cache, false );
if ( rc < 0 ) {