]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Mem/Pool.c
Fix the issue that GCC treat enum type as unsigned int which incompatible with UEFI...
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Mem / Pool.c
index d92935991a988a308bb64887b0f2428d124b384f..fe3234e9acacb80e7e79751e4a7d1c51ba4a181a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Memory pool management functions.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -128,7 +128,7 @@ LookupPoolHead (
   // MemoryType values in the range 0x80000000..0xFFFFFFFF are reserved for use by UEFI \r
   // OS loaders that are provided by operating system vendors\r
   //\r
-  if (MemoryType < 0) {\r
+  if (MemoryType >= (INT32)0x80000000 && MemoryType <= (INT32)0xffffffff) {\r
 \r
     for (Link = mPoolHeadList.ForwardLink; Link != &mPoolHeadList; Link = Link->ForwardLink) {\r
       Pool = CR(Link, POOL, Link, POOL_SIGNATURE);\r