mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
exfat: Simplify exfat_utf8_d_cmp() for code points above U+FFFF
If two Unicode code points represented in UTF-16 are different then also their UTF-32 representation must be different. Therefore conversion from UTF-32 to UTF-16 is not needed. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Git-commit: 197298a64983e2beaf1a87413daff3044b4f3821 Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: lixiang <lixiang@codeaurora.org>
This commit is contained in:
parent
825b6f8a99
commit
6d48c579cc
1 changed files with 2 additions and 7 deletions
|
|
@ -185,14 +185,9 @@ static int exfat_utf8_d_cmp(const struct dentry *dentry, unsigned int len,
|
|||
if (u_a <= 0xFFFF && u_b <= 0xFFFF) {
|
||||
if (exfat_toupper(sb, u_a) != exfat_toupper(sb, u_b))
|
||||
return 1;
|
||||
} else if (u_a > 0xFFFF && u_b > 0xFFFF) {
|
||||
if (exfat_low_surrogate(u_a) !=
|
||||
exfat_low_surrogate(u_b) ||
|
||||
exfat_high_surrogate(u_a) !=
|
||||
exfat_high_surrogate(u_b))
|
||||
return 1;
|
||||
} else {
|
||||
return 1;
|
||||
if (u_a != u_b)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue