]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
MdeModulePkg: Refine type cast for pointer subtraction
[mirror_edk2.git] / MdeModulePkg / Universal / DebugPortDxe / DebugPort.c
index 298b6b2da3e7a18b15dc3a8f0f475e22770e213c..dcb623cfebc5211cc31f8062f740aecc8200d5c8 100644 (file)
@@ -4,7 +4,7 @@
   ALL CODE IN THE SERIALIO STACK MUST BE RE-ENTRANT AND CALLABLE FROM\r
   INTERRUPT CONTEXT\r
 \r
-Copyright (c) 2006 - 2014, 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
@@ -569,7 +569,7 @@ DebugPortRead (
     LocalBufferSize = *BufferSize - (BufferPtr - (UINT8 *) Buffer);\r
   } while (LocalBufferSize != 0 && Timeout > 0);\r
 \r
-  *BufferSize = (UINTN) (BufferPtr - (UINT8 *) Buffer);\r
+  *BufferSize = (UINTN) BufferPtr - (UINTN) Buffer;\r
 \r
   return Status;\r
 }\r