mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
fs: fat: Fix warning in normalize_longname()
As observed with clang:
fs/fat/fat_write.c:1024:13: warning: comparison of constant 128
with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
if ((0x80 <= c) && (c <= 0xff))
~~~~ ^ ~
fs/fat/fat_write.c:1024:25: warning: comparison of constant 255
with expression of type 'char' is always true
[-Wtautological-constant-out-of-range-compare]
if ((0x80 <= c) && (c <= 0xff))
~ ^ ~~~~
Fixes: 25bb9dab14
("fs: fat: check and normalize file name")
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
@@ -1012,7 +1012,7 @@ again:
|
|||||||
static int normalize_longname(char *l_filename, const char *filename)
|
static int normalize_longname(char *l_filename, const char *filename)
|
||||||
{
|
{
|
||||||
const char *p, legal[] = "!#$%&\'()-.@^`_{}~";
|
const char *p, legal[] = "!#$%&\'()-.@^`_{}~";
|
||||||
char c;
|
unsigned char c;
|
||||||
int name_len;
|
int name_len;
|
||||||
|
|
||||||
/* Check that the filename is valid */
|
/* Check that the filename is valid */
|
||||||
|
Reference in New Issue
Block a user