summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs/fat_file.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-23 21:29:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-23 21:29:31 +0000
commit85b9e7fd96f81951eba685ea83b090331238675e (patch)
tree81deb184caf918773881f3f88d961ebf702c8143 /cpukit/libfs/src/dosfs/fat_file.c
parent2010-08-23 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff)
downloadrtems-85b9e7fd96f81951eba685ea83b090331238675e.tar.bz2
2010-08-23 Joel Sherrill <joel.sherrill@oarcorp.com>
CID 99 CID 100 CID 101 CID 102 * libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_misc.c: Resolve invalid use of const identified by Coverity scanner.
Diffstat (limited to 'cpukit/libfs/src/dosfs/fat_file.c')
-rw-r--r--cpukit/libfs/src/dosfs/fat_file.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/libfs/src/dosfs/fat_file.c b/cpukit/libfs/src/dosfs/fat_file.c
index 0cd5f286db..0a9b790c10 100644
--- a/cpukit/libfs/src/dosfs/fat_file.c
+++ b/cpukit/libfs/src/dosfs/fat_file.c
@@ -691,22 +691,25 @@ fat_file_ioctl(
ret = va_arg(ap, uint32_t *);
/* sanity check */
- if ( pos >= fat_fd->fat_file_size )
+ if ( pos >= fat_fd->fat_file_size ) {
+ va_end();
rtems_set_errno_and_return_minus_one( EIO );
+ }
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
- return RC_OK;
+ rc = RC_OK;
+ break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if ( rc != RC_OK )
- return rc;
+ break;
*ret = cur_cln;
break;
@@ -716,6 +719,7 @@ fat_file_ioctl(
rc = -1;
break;
}
+ va_end(ap);
return rc;
}