]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Misc/Stall.c
MdeModulePkg: Fix unix style of EOL
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Misc / Stall.c
index 5bc7814f091835b89ac95e4ca00d36fc89f4c029..95a561546fe15a8541fc8b5b64b5408a2d212c92 100644 (file)
@@ -1,7 +1,7 @@
 /** @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
@@ -32,7 +32,7 @@ CoreInternalWaitForTick (
   IN UINT64  Counter\r
   )\r
 {\r
-  while ((Counter & 0xffffffff00000000ULL) != 0) {\r
+  while (RShiftU64 (Counter, 32) > 0) {\r
     gMetronome->WaitForTick (gMetronome, 0xffffffff);\r
     Counter -= 0xffffffff;\r
   }\r
@@ -67,7 +67,7 @@ CoreStall (
   // 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