]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
Remove NibbleToHexChar() function from BaseLib
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / ProcessOptions.c
index dc7ce782364da78ba42df71ecc06fd6e6a0f3126..d72578ddfbfa52fb37b9bd13b9541802b25d1fc0 100644 (file)
@@ -383,7 +383,7 @@ ProcessOptions (
           Status = SetQuestionValue (Selection->FormSet, Selection->Form, Question, TRUE);\r
           UpdateStatusBar (NV_UPDATE_REQUIRED, Question->QuestionFlags, TRUE);\r
 \r
-          gBS->FreePool (*OptionString);\r
+          FreePool (*OptionString);\r
           *OptionString = NULL;\r
           return EFI_NOT_FOUND;\r
         }\r
@@ -407,7 +407,7 @@ ProcessOptions (
           Character[0] = CHAR_CARRIAGE_RETURN;\r
           NewStrCat (OptionString[0], Character);\r
 \r
-          gBS->FreePool (StringPtr);\r
+          FreePool (StringPtr);\r
         }\r
       }\r
     }\r
@@ -450,7 +450,7 @@ ProcessOptions (
           Link = GetNextNode (&Question->OptionListHead, Link);\r
         }\r
 \r
-        gBS->FreePool (*OptionString);\r
+        FreePool (*OptionString);\r
         *OptionString = NULL;\r
       }\r
 \r
@@ -495,7 +495,7 @@ ProcessOptions (
         Character[0] = RIGHT_ONEOF_DELIMITER;\r
         NewStrCat (OptionString[0], Character);\r
 \r
-        gBS->FreePool (StringPtr);\r
+        FreePool (StringPtr);\r
       }\r
     }\r
     break;\r
@@ -521,7 +521,7 @@ ProcessOptions (
         // Inconsistent check fail, restore Question Value\r
         //\r
         QuestionValue->Value.b = (BOOLEAN) (QuestionValue->Value.b ? FALSE : TRUE);\r
-        gBS->FreePool (*OptionString);\r
+        FreePool (*OptionString);\r
         *OptionString = NULL;\r
         return Status;\r
       }\r
@@ -641,7 +641,7 @@ ProcessOptions (
         UpdateStatusBar (NV_UPDATE_REQUIRED, Question->QuestionFlags, TRUE);\r
       }\r
 \r
-      gBS->FreePool (StringPtr);\r
+      FreePool (StringPtr);\r
     } else {\r
       *OptionString = AllocateZeroPool (BufferSize);\r
       ASSERT (*OptionString);\r
@@ -675,7 +675,7 @@ ProcessOptions (
           //\r
           // Callback request to terminate password input\r
           //\r
-          gBS->FreePool (StringPtr);\r
+          FreePool (StringPtr);\r
           return EFI_SUCCESS;\r
         }\r
 \r
@@ -685,7 +685,7 @@ ProcessOptions (
           //\r
           Status = ReadString (MenuOption, gPromptForPassword, StringPtr);\r
           if (EFI_ERROR (Status)) {\r
-            gBS->FreePool (StringPtr);\r
+            FreePool (StringPtr);\r
             return Status;\r
           }\r
 \r
@@ -703,7 +703,7 @@ ProcessOptions (
               Status = EFI_SUCCESS;\r
             }\r
 \r
-            gBS->FreePool (StringPtr);\r
+            FreePool (StringPtr);\r
             return Status;\r
           }\r
         }\r
@@ -717,7 +717,7 @@ ProcessOptions (
           //\r
           Status = ReadString (MenuOption, gPromptForPassword, StringPtr);\r
           if (EFI_ERROR (Status)) {\r
-            gBS->FreePool (StringPtr);\r
+            FreePool (StringPtr);\r
             return Status;\r
           }\r
 \r
@@ -730,12 +730,12 @@ ProcessOptions (
             //\r
             PasswordInvalid ();\r
 \r
-            gBS->FreePool (StringPtr);\r
-            gBS->FreePool (TempString);\r
+            FreePool (StringPtr);\r
+            FreePool (TempString);\r
             return Status;\r
           }\r
 \r
-          gBS->FreePool (TempString);\r
+          FreePool (TempString);\r
         }\r
       }\r
 \r
@@ -752,7 +752,7 @@ ProcessOptions (
           PasswordCallback (Selection, MenuOption, NULL);\r
         }\r
 \r
-        gBS->FreePool (StringPtr);\r
+        FreePool (StringPtr);\r
         return Status;\r
       }\r
 \r
@@ -770,8 +770,8 @@ ProcessOptions (
           PasswordCallback (Selection, MenuOption, NULL);\r
         }\r
 \r
-        gBS->FreePool (StringPtr);\r
-        gBS->FreePool (TempString);\r
+        FreePool (StringPtr);\r
+        FreePool (TempString);\r
         return Status;\r
       }\r
 \r
@@ -804,8 +804,8 @@ ProcessOptions (
         } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);\r
       }\r
 \r
-      gBS->FreePool (TempString);\r
-      gBS->FreePool (StringPtr);\r
+      FreePool (TempString);\r
+      FreePool (StringPtr);\r
     }\r
     break;\r
 \r
@@ -833,7 +833,7 @@ ProcessHelpString (
   IN  UINTN   RowCount\r
   )\r
 {\r
-  UINTN BlockWidth = (UINTN) gHelpBlockWidth - 1;\r
+  UINTN BlockWidth;\r
   UINTN AllocateSize;\r
   //\r
   // [PrevCurrIndex, CurrIndex) forms a range of a screen-line\r
@@ -866,6 +866,8 @@ ProcessHelpString (
   UINTN *IndexArray;\r
   UINTN *OldIndexArray;\r
 \r
+  BlockWidth = (UINTN) gHelpBlockWidth - 1;\r
+  \r
   //\r
   // every three elements of IndexArray form a screen-line of string:[ IndexArray[i*3], IndexArray[i*3+1] )\r
   // IndexArray[i*3+2] stores the initial glyph width of single character. to save this is because we want\r
@@ -877,7 +879,7 @@ ProcessHelpString (
   IndexArray    = AllocatePool (AllocateSize * sizeof (UINTN) * 3);\r
 \r
   if (*FormattedString != NULL) {\r
-    gBS->FreePool (*FormattedString);\r
+    FreePool (*FormattedString);\r
     *FormattedString = NULL;\r
   }\r
 \r
@@ -891,7 +893,7 @@ ProcessHelpString (
       OldIndexArray  = IndexArray;\r
       IndexArray = AllocatePool (AllocateSize * sizeof (UINTN) * 3);\r
       CopyMem (IndexArray, OldIndexArray, LineCount * sizeof (UINTN) * 3);\r
-      gBS->FreePool (OldIndexArray);\r
+      FreePool (OldIndexArray);\r
     }\r
     switch (StringPtr[CurrIndex]) {\r
 \r
@@ -1020,5 +1022,5 @@ ProcessHelpString (
       );\r
   }\r
 \r
-  gBS->FreePool (IndexArray);\r
+  FreePool (IndexArray);\r
 }\r