]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Stall: Refine to compare 2 values with the same type
authorHao Wu <hao.a.wu@intel.com>
Fri, 6 Jan 2017 07:18:27 +0000 (15:18 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 12 Jan 2017 13:26:27 +0000 (21:26 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Core/Dxe/Misc/Stall.c

index 73e90785e26927217b691fcd70f586b1ec629d16..95a561546fe15a8541fc8b5b64b5408a2d212c92 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Miscellaneous boot Services Stall service implementation\r
 \r
 /** @file\r
   UEFI Miscellaneous boot Services Stall service implementation\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -67,7 +67,7 @@ CoreStall (
   // Counter = Microseconds * 10 / gMetronome->TickPeriod\r
   // 0x1999999999999999 = (2^64 - 1) / 10\r
   //\r
   // Counter = Microseconds * 10 / gMetronome->TickPeriod\r
   // 0x1999999999999999 = (2^64 - 1) / 10\r
   //\r
-  if (Microseconds > 0x1999999999999999ULL) {\r
+  if ((UINT64) Microseconds > 0x1999999999999999ULL) {\r
     //\r
     // Microseconds is too large to multiple by 10 first.  Perform the divide \r
     // operation first and loop 10 times to avoid 64-bit math overflow.\r
     //\r
     // Microseconds is too large to multiple by 10 first.  Perform the divide \r
     // operation first and loop 10 times to avoid 64-bit math overflow.\r