summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-13 03:30:59 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-13 03:30:59 +0000
commit0c16f340a867d1636ef776dae034c48c95720386 (patch)
treefc08f32cb2ebe67c639be665705ca27f9d9c0844 /IntelFrameworkModulePkg
parent09f8b4e251427d009f0b9a32b7265d7b4b8a5caa (diff)
downloadedk2-0c16f340a867d1636ef776dae034c48c95720386.tar.gz
edk2-0c16f340a867d1636ef776dae034c48c95720386.tar.bz2
edk2-0c16f340a867d1636ef776dae034c48c95720386.zip
Minor code enhancement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9724 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c3
-rw-r--r--IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
index ad9eb807de..73d36088a5 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
@@ -1062,7 +1062,8 @@ BOpt_GetBootOptions (
FreePool (HiiString);
} else {
NewLoadContext->Description = AllocateZeroPool (StrSize((UINT16*)LoadOptionPtr));
- StrCpy(NewLoadContext->Description, (UINT16*)LoadOptionPtr);
+ ASSERT (NewLoadContext->Description != NULL);
+ StrCpy (NewLoadContext->Description, (UINT16*)LoadOptionPtr);
}
ASSERT (NewLoadContext->Description != NULL);
diff --git a/IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c b/IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c
index 6d78a68dd6..6bab4db1f0 100644
--- a/IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c
+++ b/IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c
@@ -1000,6 +1000,7 @@ FindChildNode (
}
}
+ ASSERT (CurrentChildNode != NULL);
if (CurrentChildNode->EncapsulatedStreamHandle != NULL_STREAM_HANDLE) {
//
// If the current node is an encapsulating node, recurse into it...
@@ -1054,7 +1055,6 @@ FindChildNode (
if (EFI_ERROR (Status)) {
return Status;
}
- ASSERT (CurrentChildNode != NULL);
} else {
ASSERT (EFI_ERROR (ErrorStatus));
return ErrorStatus;