mirror of https://github.com/acidanthera/audk.git
Assertions added
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7305 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8ca67c468b
commit
1ac628eee0
|
@ -279,6 +279,7 @@ CreateExpression (
|
||||||
FORM_EXPRESSION *Expression;
|
FORM_EXPRESSION *Expression;
|
||||||
|
|
||||||
Expression = AllocateZeroPool (sizeof (FORM_EXPRESSION));
|
Expression = AllocateZeroPool (sizeof (FORM_EXPRESSION));
|
||||||
|
ASSERT (Expression != NULL);
|
||||||
Expression->Signature = FORM_EXPRESSION_SIGNATURE;
|
Expression->Signature = FORM_EXPRESSION_SIGNATURE;
|
||||||
InitializeListHead (&Expression->OpCodeListHead);
|
InitializeListHead (&Expression->OpCodeListHead);
|
||||||
|
|
||||||
|
@ -302,6 +303,7 @@ CreateStorage (
|
||||||
FORMSET_STORAGE *Storage;
|
FORMSET_STORAGE *Storage;
|
||||||
|
|
||||||
Storage = AllocateZeroPool (sizeof (FORMSET_STORAGE));
|
Storage = AllocateZeroPool (sizeof (FORMSET_STORAGE));
|
||||||
|
ASSERT (Storage != NULL);
|
||||||
Storage->Signature = FORMSET_STORAGE_SIGNATURE;
|
Storage->Signature = FORMSET_STORAGE_SIGNATURE;
|
||||||
InitializeListHead (&Storage->NameValueListHead);
|
InitializeListHead (&Storage->NameValueListHead);
|
||||||
InsertTailList (&FormSet->StorageListHead, &Storage->Link);
|
InsertTailList (&FormSet->StorageListHead, &Storage->Link);
|
||||||
|
@ -433,6 +435,7 @@ InitializeRequestElement (
|
||||||
//
|
//
|
||||||
StringSize = (Storage->ConfigRequest != NULL) ? StrSize (Storage->ConfigRequest) : sizeof (CHAR16);
|
StringSize = (Storage->ConfigRequest != NULL) ? StrSize (Storage->ConfigRequest) : sizeof (CHAR16);
|
||||||
NewStr = AllocateZeroPool (StringSize + CONFIG_REQUEST_STRING_INCREMENTAL * sizeof (CHAR16));
|
NewStr = AllocateZeroPool (StringSize + CONFIG_REQUEST_STRING_INCREMENTAL * sizeof (CHAR16));
|
||||||
|
ASSERT (NewStr != NULL);
|
||||||
if (Storage->ConfigRequest != NULL) {
|
if (Storage->ConfigRequest != NULL) {
|
||||||
CopyMem (NewStr, Storage->ConfigRequest, StringSize);
|
CopyMem (NewStr, Storage->ConfigRequest, StringSize);
|
||||||
FreePool (Storage->ConfigRequest);
|
FreePool (Storage->ConfigRequest);
|
||||||
|
@ -1094,6 +1097,7 @@ ParseOpCodes (
|
||||||
// Create a new Form for this FormSet
|
// Create a new Form for this FormSet
|
||||||
//
|
//
|
||||||
CurrentForm = AllocateZeroPool (sizeof (FORM_BROWSER_FORM));
|
CurrentForm = AllocateZeroPool (sizeof (FORM_BROWSER_FORM));
|
||||||
|
ASSERT (CurrentForm != NULL);
|
||||||
CurrentForm->Signature = FORM_BROWSER_FORM_SIGNATURE;
|
CurrentForm->Signature = FORM_BROWSER_FORM_SIGNATURE;
|
||||||
InitializeListHead (&CurrentForm->ExpressionListHead);
|
InitializeListHead (&CurrentForm->ExpressionListHead);
|
||||||
InitializeListHead (&CurrentForm->StatementListHead);
|
InitializeListHead (&CurrentForm->StatementListHead);
|
||||||
|
@ -1170,6 +1174,7 @@ ParseOpCodes (
|
||||||
//
|
//
|
||||||
case EFI_IFR_DEFAULTSTORE_OP:
|
case EFI_IFR_DEFAULTSTORE_OP:
|
||||||
DefaultStore = AllocateZeroPool (sizeof (FORMSET_DEFAULTSTORE));
|
DefaultStore = AllocateZeroPool (sizeof (FORMSET_DEFAULTSTORE));
|
||||||
|
ASSERT (DefaultStore != NULL);
|
||||||
DefaultStore->Signature = FORMSET_DEFAULTSTORE_SIGNATURE;
|
DefaultStore->Signature = FORMSET_DEFAULTSTORE_SIGNATURE;
|
||||||
|
|
||||||
CopyMem (&DefaultStore->DefaultId, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultId, sizeof (UINT16));
|
CopyMem (&DefaultStore->DefaultId, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultId, sizeof (UINT16));
|
||||||
|
@ -1406,6 +1411,7 @@ ParseOpCodes (
|
||||||
// A Question may have more than one Default value which have different default types.
|
// A Question may have more than one Default value which have different default types.
|
||||||
//
|
//
|
||||||
CurrentDefault = AllocateZeroPool (sizeof (QUESTION_DEFAULT));
|
CurrentDefault = AllocateZeroPool (sizeof (QUESTION_DEFAULT));
|
||||||
|
ASSERT (CurrentDefault != NULL);
|
||||||
CurrentDefault->Signature = QUESTION_DEFAULT_SIGNATURE;
|
CurrentDefault->Signature = QUESTION_DEFAULT_SIGNATURE;
|
||||||
|
|
||||||
CurrentDefault->Value.Type = ((EFI_IFR_DEFAULT *) OpCodeData)->Type;
|
CurrentDefault->Value.Type = ((EFI_IFR_DEFAULT *) OpCodeData)->Type;
|
||||||
|
@ -1432,6 +1438,7 @@ ParseOpCodes (
|
||||||
// It create a selection for use in current Question.
|
// It create a selection for use in current Question.
|
||||||
//
|
//
|
||||||
CurrentOption = AllocateZeroPool (sizeof (QUESTION_OPTION));
|
CurrentOption = AllocateZeroPool (sizeof (QUESTION_OPTION));
|
||||||
|
ASSERT (CurrentOption != NULL);
|
||||||
CurrentOption->Signature = QUESTION_OPTION_SIGNATURE;
|
CurrentOption->Signature = QUESTION_OPTION_SIGNATURE;
|
||||||
|
|
||||||
CurrentOption->Flags = ((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Flags;
|
CurrentOption->Flags = ((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Flags;
|
||||||
|
@ -1505,6 +1512,7 @@ ParseOpCodes (
|
||||||
// evaluated at initialization and it will not be queued
|
// evaluated at initialization and it will not be queued
|
||||||
//
|
//
|
||||||
CurrentExpression = AllocateZeroPool (sizeof (FORM_EXPRESSION));
|
CurrentExpression = AllocateZeroPool (sizeof (FORM_EXPRESSION));
|
||||||
|
ASSERT (CurrentExpression != NULL);
|
||||||
CurrentExpression->Signature = FORM_EXPRESSION_SIGNATURE;
|
CurrentExpression->Signature = FORM_EXPRESSION_SIGNATURE;
|
||||||
CurrentExpression->Type = EFI_HII_EXPRESSION_DISABLE_IF;
|
CurrentExpression->Type = EFI_HII_EXPRESSION_DISABLE_IF;
|
||||||
InitializeListHead (&CurrentExpression->OpCodeListHead);
|
InitializeListHead (&CurrentExpression->OpCodeListHead);
|
||||||
|
|
Loading…
Reference in New Issue