]> git.itanic.dy.fi Git - linux-stable/commitdiff
fat: fix return value of vfat_bad_char() and vfat_replace_char() functions
authorPali Rohár <pali@kernel.org>
Mon, 26 Dec 2022 14:25:12 +0000 (15:25 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:50:04 +0000 (22:50 -0800)
These functions returns boolean value not wide character.

Link: https://lkml.kernel.org/r/20221226142512.13848-1-pali@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/namei_vfat.c

index 21620054e1c44e61654d12f687c3789205fddfe2..0735e4f0aeede0298ae9fdecf1be20a25f3eec5c 100644 (file)
@@ -200,7 +200,7 @@ static const struct dentry_operations vfat_dentry_ops = {
 
 /* Characters that are undesirable in an MS-DOS file name */
 
-static inline wchar_t vfat_bad_char(wchar_t w)
+static inline bool vfat_bad_char(wchar_t w)
 {
        return (w < 0x0020)
            || (w == '*') || (w == '?') || (w == '<') || (w == '>')
@@ -208,7 +208,7 @@ static inline wchar_t vfat_bad_char(wchar_t w)
            || (w == '\\');
 }
 
-static inline wchar_t vfat_replace_char(wchar_t w)
+static inline bool vfat_replace_char(wchar_t w)
 {
        return (w == '[') || (w == ']') || (w == ';') || (w == ',')
            || (w == '+') || (w == '=');