[rtems commit] dosfs: Fix long file name padding
Sebastian Huber
sebh at rtems.org
Tue Mar 21 15:18:06 UTC 2017
Module: rtems
Branch: 4.11
Commit: 7011f260617859384379cb9a351eb49983a4b7d1
Changeset: http://git.rtems.org/rtems/commit/?id=7011f260617859384379cb9a351eb49983a4b7d1
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Mar 16 07:44:38 2017 +0100
dosfs: Fix long file name padding
Close #2934.
---
cpukit/libfs/src/dosfs/msdos_misc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index 321d1be..3ea462d 100644
--- a/cpukit/libfs/src/dosfs/msdos_misc.c
+++ b/cpukit/libfs/src/dosfs/msdos_misc.c
@@ -1760,10 +1760,11 @@ msdos_add_file (
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; ++i)
{
- if (!(*n == 0 && *(n+1) == 0))
+ if (*n != 0 || *(n + 1) != 0)
{
*p = *n;
- *(p+1) = *(n+1);
+ *(p + 1) = *(n + 1);
+ n += MSDOS_NAME_LFN_BYTES_PER_CHAR;
}
else
{
@@ -1771,7 +1772,6 @@ msdos_add_file (
p [1] = fill;
fill = 0xff;
}
- n += MSDOS_NAME_LFN_BYTES_PER_CHAR;
#if MSDOS_FIND_PRINT
printf ( "'%c''%c'", *p, *(p+1) );
#endif
More information about the vc
mailing list