Minor code enhancement.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9724 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24 2010-01-13 03:30:59 +00:00
parent 09f8b4e251
commit 0c16f340a8
2 changed files with 3 additions and 2 deletions

View File

@ -1062,7 +1062,8 @@ BOpt_GetBootOptions (
FreePool (HiiString); FreePool (HiiString);
} else { } else {
NewLoadContext->Description = AllocateZeroPool (StrSize((UINT16*)LoadOptionPtr)); NewLoadContext->Description = AllocateZeroPool (StrSize((UINT16*)LoadOptionPtr));
StrCpy(NewLoadContext->Description, (UINT16*)LoadOptionPtr); ASSERT (NewLoadContext->Description != NULL);
StrCpy (NewLoadContext->Description, (UINT16*)LoadOptionPtr);
} }
ASSERT (NewLoadContext->Description != NULL); ASSERT (NewLoadContext->Description != NULL);

View File

@ -1000,6 +1000,7 @@ FindChildNode (
} }
} }
ASSERT (CurrentChildNode != NULL);
if (CurrentChildNode->EncapsulatedStreamHandle != NULL_STREAM_HANDLE) { if (CurrentChildNode->EncapsulatedStreamHandle != NULL_STREAM_HANDLE) {
// //
// If the current node is an encapsulating node, recurse into it... // If the current node is an encapsulating node, recurse into it...
@ -1054,7 +1055,6 @@ FindChildNode (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
} }
ASSERT (CurrentChildNode != NULL);
} else { } else {
ASSERT (EFI_ERROR (ErrorStatus)); ASSERT (EFI_ERROR (ErrorStatus));
return ErrorStatus; return ErrorStatus;