diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-18 01:47:48 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-18 01:47:48 +0000 |
commit | a624250733a2883aeeba3e55eed0096472814168 (patch) | |
tree | a4e28f97e0224d05f47ea99066aca9c5dcbc0545 /nuttx/fs | |
parent | 01cbaa393093aadfb26d3e25f8750ba486e33151 (diff) | |
download | px4-nuttx-a624250733a2883aeeba3e55eed0096472814168.tar.gz px4-nuttx-a624250733a2883aeeba3e55eed0096472814168.tar.bz2 px4-nuttx-a624250733a2883aeeba3e55eed0096472814168.zip |
Documentation update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3795 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r-- | nuttx/fs/fat/fs_fat32dirent.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/nuttx/fs/fat/fs_fat32dirent.c b/nuttx/fs/fat/fs_fat32dirent.c index b64ab87e3..8ba3d3a69 100644 --- a/nuttx/fs/fat/fs_fat32dirent.c +++ b/nuttx/fs/fat/fs_fat32dirent.c @@ -941,28 +941,18 @@ static bool fat_cmplfname(const uint8_t *direntry, const uint8_t *substr) chunk = LDIR_PTRWCHAR1_5(direntry); match = fat_cmplfnchunk(chunk, substr, 5); - if (match) + if (match && len > 5) { - /* Don't go past the end of the sub-string */ + /* Check bytes 6-11 */ - if (len > 5) + chunk = LDIR_PTRWCHAR6_11(direntry); + match = fat_cmplfnchunk(chunk, &substr[5], 6); + if (match && len > 11) { - /* Check bytes 6-11 */ + /* Check bytes 12-13 */ - chunk = LDIR_PTRWCHAR6_11(direntry); - match = fat_cmplfnchunk(chunk, &substr[5], 6); - if (match) - { - /* Don't go past the end of the sub-string */ - - if (len > 11) - { - /* Check bytes 12-13 */ - - chunk = LDIR_PTRWCHAR12_13(direntry); - match = fat_cmplfnchunk(chunk, &substr[11], 2); - } - } + chunk = LDIR_PTRWCHAR12_13(direntry); + match = fat_cmplfnchunk(chunk, &substr[11], 2); } } |