]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / Language.c
index 2eab617ae59ce109188f72d237608de800dbbe5a..bb67880e972b02430bae9b4a18f1776b9c82d8c5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Language settings\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, 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
@@ -343,7 +343,7 @@ IsLangInSupportedLangCodes(
   IN  CHAR8            *SupportedLang,\r
   IN  CHAR8            *Lang,\r
   IN  BOOLEAN          Iso639Language\r
-  ) \r
+  )\r
 {\r
   UINTN    Index;\r
   UINTN    CompareLength;\r
@@ -375,8 +375,8 @@ IsLangInSupportedLangCodes(
       // Determine the length of the next language code in SupportedLang\r
       //\r
       for (CompareLength = 0; SupportedLang[CompareLength] != '\0' && SupportedLang[CompareLength] != ';'; CompareLength++);\r
-      \r
-      if ((CompareLength == LanguageLength) && \r
+\r
+      if ((CompareLength == LanguageLength) &&\r
           (AsciiStrnCmp (Lang, SupportedLang, CompareLength) == 0)) {\r
         //\r
         // Successfully find the Lang string in SupportedLang string.\r
@@ -404,23 +404,22 @@ VOID
 InitializeLangVariable (\r
   IN CHAR16     *LangName,\r
   IN CHAR8      *SupportedLang,\r
-  IN CHAR8      *DefaultLang,     \r
+  IN CHAR8      *DefaultLang,\r
   IN BOOLEAN    Iso639Language\r
   )\r
 {\r
-  EFI_STATUS  Status;\r
   CHAR8       *Lang;\r
 \r
   //\r
   // Find current Lang or PlatformLang from EFI Variable.\r
   //\r
-  Status = GetEfiGlobalVariable2 (LangName, (VOID **) &Lang, NULL);\r
+  GetEfiGlobalVariable2 (LangName, (VOID **) &Lang, NULL);\r
   //\r
   // If Lang or PlatformLang variable is not found,\r
   // or it has been set to an unsupported value(not one of the supported language codes),\r
   // set the default language code to it.\r
   //\r
-  if (EFI_ERROR (Status) || !IsLangInSupportedLangCodes (SupportedLang, Lang, Iso639Language)) {\r
+  if ((Lang == NULL) || !IsLangInSupportedLangCodes (SupportedLang, Lang, Iso639Language)) {\r
     //\r
     // The default language code should be one of the supported language codes.\r
     //\r
@@ -462,7 +461,7 @@ InitializeLanguage (
   if (LangCodesSettingRequired) {\r
     if (!FeaturePcdGet (PcdUefiVariableDefaultLangDeprecate)) {\r
       //\r
-      // UEFI 2.1 depricated this variable so we support turning it off\r
+      // UEFI 2.0 depricated this variable so we support turning it off\r
       //\r
       Status = gRT->SetVariable (\r
                       L"LangCodes",\r
@@ -492,7 +491,7 @@ InitializeLanguage (
 \r
   if (!FeaturePcdGet (PcdUefiVariableDefaultLangDeprecate)) {\r
     //\r
-    // UEFI 2.1 depricated this variable so we support turning it off\r
+    // UEFI 2.0 depricated this variable so we support turning it off\r
     //\r
     InitializeLangVariable (L"Lang", LangCodes, (CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultLang), TRUE);\r
   }\r