]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Cleanup K8 warning.
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 6 Feb 2009 03:58:04 +0000 (03:58 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 6 Feb 2009 03:58:04 +0000 (03:58 +0000)
We need judge return status of CoreGetMemorySpaceMap() to avoid the generation of NULL pointer of MemorySpaceMap.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7448 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/Gcd/Gcd.c

index 6df0a9f3cdce26c07282c3247f0589add33713be..c9aad1ce3a4596713b2fed01acba509d17471bd1 100644 (file)
@@ -2151,6 +2151,8 @@ CoreInitializeGcdServices (
   // Add and allocate the remaining unallocated system memory to the memory services.\r
   //\r
   Status = CoreGetMemorySpaceMap (&NumberOfDescriptors, &MemorySpaceMap);\r
+  ASSERT (Status == EFI_SUCCESS);\r
+\r
   for (Index = 0; Index < NumberOfDescriptors; Index++) {\r
     if (MemorySpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {\r
       if (MemorySpaceMap[Index].ImageHandle == NULL) {\r