]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.c
Merge branch 'master' of https://github.com/tianocore/edk2
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiOnUefiHiiThunk / HiiDatabase.c
index 854d0ec451cf8e4bef8d7e81276154f24d83ce01..2d456da3035392c2548552a272dd2e370d3d9ea9 100644 (file)
@@ -2,7 +2,7 @@
 Framework to UEFI 2.1 HII Thunk. The driver consume UEFI HII protocols\r
 to produce a Framework HII protocol.\r
 \r
-Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -158,6 +158,7 @@ InitializeHiiDatabase (
 \r
   Status = ListPackageLists (EFI_HII_PACKAGE_STRINGS, NULL, &BufferLength, &Buffer);\r
   if (Status == EFI_SUCCESS) {\r
+    ASSERT (Buffer != NULL);\r
     for (Index = 0; Index < BufferLength / sizeof (EFI_HII_HANDLE); Index++) {\r
       ThunkContext = CreateThunkContextForUefiHiiHandle (Buffer[Index]);\r
       ASSERT (ThunkContext!= NULL);\r
@@ -386,7 +387,7 @@ Done:
   If not enough resource to complete the operation, then ASSERT.\r
 \r
   @param  HiiHandle              The HII package list handle.\r
-  @param  FirstLanguage          Pointer to language name buffer.\r
+  @param  PrimaryLanguage        Pointer to language name buffer.\r
   \r
   @return The supported languages.\r
 \r
@@ -395,7 +396,7 @@ CHAR8 *
 EFIAPI\r
 HiiGetSupportedSecondaryLanguages (\r
   IN EFI_HII_HANDLE           HiiHandle,\r
-  IN CONST CHAR8              *FirstLanguage\r
+  IN CONST CHAR8              *PrimaryLanguage\r
   )\r
 {\r
   EFI_STATUS  Status;\r
@@ -414,7 +415,7 @@ HiiGetSupportedSecondaryLanguages (
     return NULL;\r
   }\r
 \r
-  Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, FirstLanguage, LanguageString, &BufferSize);\r
+  Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, PrimaryLanguage, LanguageString, &BufferSize);\r
   ASSERT (Status != EFI_NOT_FOUND);\r
   \r
   if (Status == EFI_BUFFER_TOO_SMALL) {\r
@@ -424,7 +425,7 @@ HiiGetSupportedSecondaryLanguages (
       return NULL;\r
     }\r
 \r
-    Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, FirstLanguage, LanguageString, &BufferSize);\r
+    Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, PrimaryLanguage, LanguageString, &BufferSize);\r
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -493,7 +494,7 @@ HiiGetSecondaryLanguages (
   UnicodeStrToAsciiStr (PrimaryLanguage, PrimaryLang639);\r
 \r
   PrimaryLang4646 = ConvertLanguagesIso639ToRfc4646 (PrimaryLang639);\r
-  ASSERT_EFI_ERROR (PrimaryLang4646 != NULL);\r
+  ASSERT (PrimaryLang4646 != NULL);\r
 \r
   SecLangCodes4646 = HiiGetSupportedSecondaryLanguages (UefiHiiHandle, PrimaryLang4646);\r
 \r
@@ -543,4 +544,3 @@ Done:
   return Status;\r
 }\r
 \r
\r