add assert logic to avoid Klocwork fake report

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7512 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-02-12 06:39:01 +00:00
parent a1b749d074
commit 525aded947
1 changed files with 3 additions and 0 deletions

View File

@ -651,6 +651,8 @@ CoreConvertPages (
// if that's all we've got // if that's all we've got
// //
RangeEnd = End; RangeEnd = End;
ASSERT (Entry != NULL);
if (Entry->End < End) { if (Entry->End < End) {
RangeEnd = Entry->End; RangeEnd = Entry->End;
} }
@ -1099,6 +1101,7 @@ CoreFreePages (
Alignment = EFI_DEFAULT_PAGE_ALLOCATION_ALIGNMENT; Alignment = EFI_DEFAULT_PAGE_ALLOCATION_ALIGNMENT;
ASSERT (Entry != NULL);
if (Entry->Type == EfiACPIReclaimMemory || if (Entry->Type == EfiACPIReclaimMemory ||
Entry->Type == EfiACPIMemoryNVS || Entry->Type == EfiACPIMemoryNVS ||
Entry->Type == EfiRuntimeServicesCode || Entry->Type == EfiRuntimeServicesCode ||