From: Pali Rohár Date: Mon, 26 Dec 2022 14:25:12 +0000 (+0100) Subject: fat: fix return value of vfat_bad_char() and vfat_replace_char() functions X-Git-Tag: v6.3-rc1~112^2~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=227849a33a8ba2ee6fdff0a0a724b2af1c3b344c;p=thirdparty%2Flinux.git fat: fix return value of vfat_bad_char() and vfat_replace_char() functions 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 Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton --- diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index 21620054e1c44..0735e4f0aeede 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c @@ -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 == '=');