summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-10-20 03:01:10 +0000
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-10-20 03:01:10 +0000
commitf8a1c229b353a13175b4f8682f550c7d54354686 (patch)
tree76bcef8b8ddf7ed49ff81901cd505a169f7c703e /MdeModulePkg
parent6446c98725949dbc5bbf51a2ce1ae004c74a511c (diff)
downloadedk2-platforms-f8a1c229b353a13175b4f8682f550c7d54354686.tar.xz
1. Move ASSERT to proper place.
2. Move EFI_IFR_BUTTON_OP to Statemens block since now IfrButton is updated from Question to be Statement. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9345 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
index 48f608a14e..7d31ed5e9f 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
@@ -1031,6 +1031,7 @@ ParseOpCodes (
break;
}
+ ASSERT (CurrentExpression != NULL);
InsertTailList (&CurrentExpression->OpCodeListHead, &ExpressionOpCode->Link);
if (SingleOpCodeExpression) {
@@ -1050,7 +1051,6 @@ ParseOpCodes (
return Status;
}
- ASSERT (CurrentExpression != NULL);
if (CurrentExpression->Result.Type != EFI_IFR_TYPE_BOOLEAN) {
return EFI_INVALID_PARAMETER;
}
@@ -1071,7 +1071,7 @@ ParseOpCodes (
case EFI_IFR_FORM_SET_OP:
//
- // check the formset GUID
+ // Check the formset GUID
//
if (CompareMem (&FormSet->Guid, &((EFI_IFR_FORM_SET *) OpCodeData)->Guid, sizeof (EFI_GUID)) != 0) {
return EFI_INVALID_PARAMETER;
@@ -1202,6 +1202,12 @@ ParseOpCodes (
CopyMem (&CurrentStatement->TextTwo, &((EFI_IFR_TEXT *) OpCodeData)->TextTwo, sizeof (EFI_STRING_ID));
break;
+ case EFI_IFR_RESET_BUTTON_OP:
+ CurrentStatement = CreateStatement (OpCodeData, FormSet, CurrentForm);
+ ASSERT (CurrentStatement != NULL);
+ CopyMem (&CurrentStatement->DefaultId, &((EFI_IFR_RESET_BUTTON *) OpCodeData)->DefaultId, sizeof (EFI_DEFAULT_ID));
+ break;
+
//
// Questions
//
@@ -1219,15 +1225,6 @@ ParseOpCodes (
}
break;
- case EFI_IFR_RESET_BUTTON_OP:
- //
- // Create Statement
- //
- CurrentStatement = CreateStatement (OpCodeData, FormSet, CurrentForm);
- ASSERT (CurrentStatement != NULL);
- CopyMem (&CurrentStatement->DefaultId, &((EFI_IFR_RESET_BUTTON *) OpCodeData)->DefaultId, sizeof (EFI_DEFAULT_ID));
- break;
-
case EFI_IFR_REF_OP:
CurrentStatement = CreateQuestion (OpCodeData, FormSet, CurrentForm);
ASSERT (CurrentStatement != NULL);
@@ -1746,12 +1743,12 @@ ParseOpCodes (
//
// This is DisableIf expression for Form, it should be a constant expression
//
+ ASSERT (CurrentExpression != NULL);
Status = EvaluateExpression (FormSet, CurrentForm, CurrentExpression);
if (EFI_ERROR (Status)) {
return Status;
}
- ASSERT (CurrentExpression != NULL);
if (CurrentExpression->Result.Type != EFI_IFR_TYPE_BOOLEAN) {
return EFI_INVALID_PARAMETER;
}