]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
IntelFrameworkModulePkg: Refine type cast for pointer subtraction
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / GenericBdsLib / BdsMisc.c
index 24c1998a1415de2773f20416bc68ef659408da78..2ba511aada0058a48877cafae39c54c38354c095 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Misc BDS library function\r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -669,7 +669,7 @@ BdsLibVariableToOption (
   // Get load opion data.\r
   //\r
   LoadOptions     = TempPtr;\r
-  LoadOptionsSize = (UINT32) (VariableSize - (UINTN) (TempPtr - Variable));\r
+  LoadOptionsSize = (UINT32) (VariableSize - ((UINTN)TempPtr - (UINTN)Variable));\r
 \r
   //\r
   // The Console variables may have multiple device paths, so make\r