summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/Database.c')
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Database.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
index 9081e7c5cb..918559e544 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
@@ -784,7 +784,6 @@ InsertStringPackage (
EFI_STATUS Status;
EFI_HII_PACKAGE_HEADER PackageHeader;
CHAR8 *Language;
- CHAR8 *MatchedLanguage;
UINT32 LanguageSize;
LIST_ENTRY *Link;
@@ -810,10 +809,8 @@ InsertStringPackage (
AsciiStrCpy (Language, (CHAR8 *) PackageHdr + HeaderSize - LanguageSize);
for (Link = PackageList->StringPkgHdr.ForwardLink; Link != &PackageList->StringPkgHdr; Link = Link->ForwardLink) {
StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
- MatchedLanguage = GetBestLanguage (StringPackage->StringPkgHdr->Language, FALSE, (CHAR8 *) Language, NULL);
- if (MatchedLanguage != NULL) {
+ if (HiiCompareLanguage (Language, StringPackage->StringPkgHdr->Language)) {
FreePool (Language);
- FreePool (MatchedLanguage);
return EFI_UNSUPPORTED;
}
}