summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-21 06:59:58 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-21 06:59:58 +0000
commitf4113e1fdb95c35145a86067c82267610625de74 (patch)
tree4efb6f59e9017229404781f2dcbc082178f21503 /MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
parente38fc273849da854be2c9392b5e1bc3178f7f0bc (diff)
downloadedk2-platforms-f4113e1fdb95c35145a86067c82267610625de74.tar.xz
1) Remove the variable initalization in declaration.
2) Change all gBS->FreePool to use the MdePkg/BaseLib's FreePool. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6662 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c b/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
index dc7ce78236..d72578ddfb 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
@@ -383,7 +383,7 @@ ProcessOptions (
Status = SetQuestionValue (Selection->FormSet, Selection->Form, Question, TRUE);
UpdateStatusBar (NV_UPDATE_REQUIRED, Question->QuestionFlags, TRUE);
- gBS->FreePool (*OptionString);
+ FreePool (*OptionString);
*OptionString = NULL;
return EFI_NOT_FOUND;
}
@@ -407,7 +407,7 @@ ProcessOptions (
Character[0] = CHAR_CARRIAGE_RETURN;
NewStrCat (OptionString[0], Character);
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
}
}
}
@@ -450,7 +450,7 @@ ProcessOptions (
Link = GetNextNode (&Question->OptionListHead, Link);
}
- gBS->FreePool (*OptionString);
+ FreePool (*OptionString);
*OptionString = NULL;
}
@@ -495,7 +495,7 @@ ProcessOptions (
Character[0] = RIGHT_ONEOF_DELIMITER;
NewStrCat (OptionString[0], Character);
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
}
}
break;
@@ -521,7 +521,7 @@ ProcessOptions (
// Inconsistent check fail, restore Question Value
//
QuestionValue->Value.b = (BOOLEAN) (QuestionValue->Value.b ? FALSE : TRUE);
- gBS->FreePool (*OptionString);
+ FreePool (*OptionString);
*OptionString = NULL;
return Status;
}
@@ -641,7 +641,7 @@ ProcessOptions (
UpdateStatusBar (NV_UPDATE_REQUIRED, Question->QuestionFlags, TRUE);
}
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
} else {
*OptionString = AllocateZeroPool (BufferSize);
ASSERT (*OptionString);
@@ -675,7 +675,7 @@ ProcessOptions (
//
// Callback request to terminate password input
//
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
return EFI_SUCCESS;
}
@@ -685,7 +685,7 @@ ProcessOptions (
//
Status = ReadString (MenuOption, gPromptForPassword, StringPtr);
if (EFI_ERROR (Status)) {
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
return Status;
}
@@ -703,7 +703,7 @@ ProcessOptions (
Status = EFI_SUCCESS;
}
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
return Status;
}
}
@@ -717,7 +717,7 @@ ProcessOptions (
//
Status = ReadString (MenuOption, gPromptForPassword, StringPtr);
if (EFI_ERROR (Status)) {
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
return Status;
}
@@ -730,12 +730,12 @@ ProcessOptions (
//
PasswordInvalid ();
- gBS->FreePool (StringPtr);
- gBS->FreePool (TempString);
+ FreePool (StringPtr);
+ FreePool (TempString);
return Status;
}
- gBS->FreePool (TempString);
+ FreePool (TempString);
}
}
@@ -752,7 +752,7 @@ ProcessOptions (
PasswordCallback (Selection, MenuOption, NULL);
}
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
return Status;
}
@@ -770,8 +770,8 @@ ProcessOptions (
PasswordCallback (Selection, MenuOption, NULL);
}
- gBS->FreePool (StringPtr);
- gBS->FreePool (TempString);
+ FreePool (StringPtr);
+ FreePool (TempString);
return Status;
}
@@ -804,8 +804,8 @@ ProcessOptions (
} while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
}
- gBS->FreePool (TempString);
- gBS->FreePool (StringPtr);
+ FreePool (TempString);
+ FreePool (StringPtr);
}
break;
@@ -833,7 +833,7 @@ ProcessHelpString (
IN UINTN RowCount
)
{
- UINTN BlockWidth = (UINTN) gHelpBlockWidth - 1;
+ UINTN BlockWidth;
UINTN AllocateSize;
//
// [PrevCurrIndex, CurrIndex) forms a range of a screen-line
@@ -866,6 +866,8 @@ ProcessHelpString (
UINTN *IndexArray;
UINTN *OldIndexArray;
+ BlockWidth = (UINTN) gHelpBlockWidth - 1;
+
//
// every three elements of IndexArray form a screen-line of string:[ IndexArray[i*3], IndexArray[i*3+1] )
// IndexArray[i*3+2] stores the initial glyph width of single character. to save this is because we want
@@ -877,7 +879,7 @@ ProcessHelpString (
IndexArray = AllocatePool (AllocateSize * sizeof (UINTN) * 3);
if (*FormattedString != NULL) {
- gBS->FreePool (*FormattedString);
+ FreePool (*FormattedString);
*FormattedString = NULL;
}
@@ -891,7 +893,7 @@ ProcessHelpString (
OldIndexArray = IndexArray;
IndexArray = AllocatePool (AllocateSize * sizeof (UINTN) * 3);
CopyMem (IndexArray, OldIndexArray, LineCount * sizeof (UINTN) * 3);
- gBS->FreePool (OldIndexArray);
+ FreePool (OldIndexArray);
}
switch (StringPtr[CurrIndex]) {
@@ -1020,5 +1022,5 @@ ProcessHelpString (
);
}
- gBS->FreePool (IndexArray);
+ FreePool (IndexArray);
}