X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FGcd%2FGcd.c;h=c351d215dc284b5ac94259b5c055fe2ed353b4cf;hp=49697ae89c0535a7ae9dbfca0fcee8e8c5e434d1;hb=3d78c020d22023d35d27b48817d73ff31a361ac7;hpb=055c829c4212f12614ad80dcd161a2b4f5cf6713 diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 49697ae89c..c351d215dc 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -3,7 +3,7 @@ The GCD services are used to manage the memory and I/O regions that are accessible to the CPU that is executing the DXE core. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1012,15 +1012,15 @@ CoreAllocateSpace ( // // Make sure parameters are valid // - if (GcdAllocateType < 0 || GcdAllocateType >= EfiGcdMaxAllocateType) { + if ((UINT32)GcdAllocateType >= EfiGcdMaxAllocateType) { DEBUG ((DEBUG_GCD, " Status = %r\n", EFI_INVALID_PARAMETER)); return EFI_INVALID_PARAMETER; } - if (GcdMemoryType < 0 || GcdMemoryType >= EfiGcdMemoryTypeMaximum) { + if ((UINT32)GcdMemoryType >= EfiGcdMemoryTypeMaximum) { DEBUG ((DEBUG_GCD, " Status = %r\n", EFI_INVALID_PARAMETER)); return EFI_INVALID_PARAMETER; } - if (GcdIoType < 0 || GcdIoType >= EfiGcdIoTypeMaximum) { + if ((UINT32)GcdIoType >= EfiGcdIoTypeMaximum) { DEBUG ((DEBUG_GCD, " Status = %r\n", EFI_INVALID_PARAMETER)); return EFI_INVALID_PARAMETER; }