summaryrefslogtreecommitdiff
path: root/FatPkg/EnhancedFatDxe
diff options
context:
space:
mode:
Diffstat (limited to 'FatPkg/EnhancedFatDxe')
-rw-r--r--FatPkg/EnhancedFatDxe/UnicodeCollation.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/FatPkg/EnhancedFatDxe/UnicodeCollation.c b/FatPkg/EnhancedFatDxe/UnicodeCollation.c
index 574db9783e..e0b7e0d6f0 100644
--- a/FatPkg/EnhancedFatDxe/UnicodeCollation.c
+++ b/FatPkg/EnhancedFatDxe/UnicodeCollation.c
@@ -87,23 +87,13 @@ InitializeUnicodeCollationSupportWorker (
// Find the best matching matching language from the supported languages
// of Unicode Collation (2) protocol.
//
- if (Language == NULL) {
- BestLanguage = GetBestLanguage (
- Uci->SupportedLanguages,
- Iso639Language,
- DefaultLanguage,
- NULL
- );
- } else {
- BestLanguage = GetBestLanguage (
- Uci->SupportedLanguages,
- Iso639Language,
- Language,
- Iso639Language,
- DefaultLanguage,
- NULL
- );
- }
+ BestLanguage = GetBestLanguage (
+ Uci->SupportedLanguages,
+ Iso639Language,
+ (Language == NULL) ? Language : "",
+ DefaultLanguage,
+ NULL
+ );
if (BestLanguage != NULL) {
FreePool (BestLanguage);
mUnicodeCollationInterface = Uci;