From 525aded9470895475b01f123c3af45fbd74396aa Mon Sep 17 00:00:00 2001 From: eric_tian Date: Thu, 12 Feb 2009 06:39:01 +0000 Subject: 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 --- MdeModulePkg/Core/Dxe/Mem/Page.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'MdeModulePkg/Core/Dxe') diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 1f9e659753..4f31b5f57f 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -651,6 +651,8 @@ CoreConvertPages ( // if that's all we've got // RangeEnd = End; + + ASSERT (Entry != NULL); if (Entry->End < End) { RangeEnd = Entry->End; } @@ -1099,6 +1101,7 @@ CoreFreePages ( Alignment = EFI_DEFAULT_PAGE_ALLOCATION_ALIGNMENT; + ASSERT (Entry != NULL); if (Entry->Type == EfiACPIReclaimMemory || Entry->Type == EfiACPIMemoryNVS || Entry->Type == EfiRuntimeServicesCode || -- cgit v1.2.3