]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
ShellPkg: Refine type cast for pointer subtraction
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / SmbiosView.c
index 56b682aa606dd0d64e4267325a9a91bdd31b8c1e..a5b16fec08176ceb1c5e4bd6c780195a0c39bed4 100644 (file)
@@ -2,7 +2,7 @@
   Tools of clarify the content of the smbios table.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 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
@@ -700,7 +700,7 @@ CalculateSmbios64BitStructureCountAndLength (
     //\r
     // Length = Next structure head - this structure head\r
     //\r
-    (*Smbios64TableLength) += (UINTN) (Smbios.Raw - Raw);\r
+    (*Smbios64TableLength) += ((UINTN) Smbios.Raw - (UINTN) Raw);\r
     if ((*Smbios64TableLength) > Smbios64EntryPoint->TableMaximumSize) {\r
        //\r
        // The actual table length exceeds maximum table size,\r