]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
MdeModulePkg: Refine type cast for pointer subtraction
[mirror_edk2.git] / MdeModulePkg / Universal / FaultTolerantWriteDxe / FaultTolerantWrite.c
index 2e3e8c77d14f1fa87ad7f94770eae78f754e693e..49e747b9016bd41fe2894d875ca4edc98d0cf6ea 100644 (file)
@@ -3,7 +3,7 @@
   These are the common Fault Tolerant Write (FTW) functions that are shared \r
   by DXE FTW driver and SMM FTW driver.\r
 \r
-Copyright (c) 2006 - 2015, 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
@@ -373,7 +373,7 @@ FtwWrite (
   //\r
   // If Record is out of the range of Header, return access denied.\r
   //\r
-  if (((UINTN)((UINT8 *) Record - (UINT8 *) Header)) > FTW_WRITE_TOTAL_SIZE (Header->NumberOfWrites - 1, Header->PrivateDataSize)) {\r
+  if (((UINTN) Record - (UINTN) Header) > FTW_WRITE_TOTAL_SIZE (Header->NumberOfWrites - 1, Header->PrivateDataSize)) {\r
     return EFI_ACCESS_DENIED;\r
   }\r
 \r