summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs
diff options
context:
space:
mode:
authorJosh Oguin <josh.oguin@oarcorp.com>2014-11-19 14:36:44 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-11-26 07:51:58 -0600
commit10f28a3af1eaf3aa33afb0e30ec49b19df2c19ae (patch)
treec59a7096548941ef35ddc70f5c163b502b576aa5 /cpukit/libfs/src/dosfs
parentlibcsupport/src/newlibc_exit.c: Remove dead code (diff)
downloadrtems-10f28a3af1eaf3aa33afb0e30ec49b19df2c19ae.tar.bz2
dosfs/msdos_conv.c: Remove unnecessary operations
These were flagged by CodeSonar. The assignments on variable declaration are overridden a few lines below and the other line later with name_size is where name_size was not used after this assignment.
Diffstat (limited to 'cpukit/libfs/src/dosfs')
-rw-r--r--cpukit/libfs/src/dosfs/msdos_conv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_conv.c b/cpukit/libfs/src/dosfs/msdos_conv.c
index b391717d07..98f2e9be81 100644
--- a/cpukit/libfs/src/dosfs/msdos_conv.c
+++ b/cpukit/libfs/src/dosfs/msdos_conv.c
@@ -409,8 +409,8 @@ msdos_filename_utf8_to_long_name_for_save (
{
ssize_t returned_size = 0;
int eno = 0;
- size_t name_size = utf8_name_size;
- size_t name_size_tmp = long_name_size / MSDOS_NAME_LFN_BYTES_PER_CHAR;
+ size_t name_size;
+ size_t name_size_tmp;
int i;
uint16_t c;
unsigned int chars_written;
@@ -452,7 +452,6 @@ msdos_filename_utf8_to_long_name_for_save (
if ( name_size == UTF16_NULL_SIZE && c == UTF16_NULL ) {
long_name[i] = c;
returned_size += MSDOS_NAME_LFN_BYTES_PER_CHAR;
- name_size -= MSDOS_NAME_LFN_BYTES_PER_CHAR;
}
else if ( name_size != 0 )
eno = EINVAL;