summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-21 00:57:17 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-21 00:57:17 +0000
commitd6bee311ce3edfd6db8c3b36f0c69c52fa768b7f (patch)
treecedf8a04930c24e4206acb61dc48cdee5efdec1e /MdeModulePkg
parent48ee8e3e8c1c65bd1cd853e48a8820ae3a4c60e8 (diff)
downloadedk2-platforms-d6bee311ce3edfd6db8c3b36f0c69c52fa768b7f.tar.xz
Enhance the code to make the code logic more clear.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13650 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c4
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Ui.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 8aced87c85..79829e6643 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -815,7 +815,7 @@ GetToken (
String = HiiGetString (HiiHandle, Token, NULL);
if (String == NULL) {
- String = AllocateCopyPool (sizeof (mUnknownString), mUnknownString);
+ String = AllocateCopyPool (StrSize (mUnknownString), mUnknownString);
ASSERT (String != NULL);
}
return (CHAR16 *) String;
@@ -3269,7 +3269,7 @@ ExtractDefault (
//
// Initilize Questions' Value
//
- LoadFormSetConfig (NULL, LocalFormSet);
+ Status = LoadFormSetConfig (NULL, LocalFormSet);
if (EFI_ERROR (Status)) {
DestroyFormSet (LocalFormSet);
continue;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
index f48afbf66c..f3019a8408 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
@@ -957,6 +957,9 @@ CreateDialog (
TempString[Index - 1] = CHAR_NULL;
StrCpy (StringBuffer, TempString);
}
+ //
+ // break skipped on purpose
+ //
default:
//