(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
Copyright (C) 2014, Red Hat, Inc.\r
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>\r
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 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
StrnCpyS(CommandLineCopy, StrSize(CommandLineCopy)/sizeof(CHAR16), NewCommandLine, StrLen(NewCommandLine));\r
\r
if (FirstLocation != CommandLineCopy + StrLen(CommandLineCopy)\r
- && ((UINTN)(FirstLocation - CommandLineCopy) < StrLen(NewCommandLine))\r
+ && (((UINTN)FirstLocation - (UINTN)CommandLineCopy)/sizeof(CHAR16) < StrLen(NewCommandLine))\r
){\r
- *(NewCommandLine + (UINTN)(FirstLocation - CommandLineCopy)) = CHAR_NULL;\r
+ *(NewCommandLine + ((UINTN)FirstLocation - (UINTN)CommandLineCopy)/sizeof(CHAR16)) = CHAR_NULL;\r
}\r
\r
if (!EFI_ERROR(Status)) {\r
//\r
// Crc32\r
//\r
- gBS->CalculateCrc32 (Buffer, (UINTN) (Ptr - Buffer), (UINT32 *) Ptr);\r
+ gBS->CalculateCrc32 (Buffer, (UINTN) Ptr - (UINTN) Buffer, (UINT32 *) Ptr);\r
\r
Status = ShellWriteFile (FileHandle, &BufferSize, Buffer);\r
FreePool (Buffer);\r
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
//\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
) {\r
Walker++;\r
} else {\r
- if (*Walker == L'-' && (UINTN)(Walker - PrevWalker) == mGuidDataLen[Index]) {\r
+ if (*Walker == L'-' && (((UINTN)Walker - (UINTN)PrevWalker) / sizeof (CHAR16)) == mGuidDataLen[Index]) {\r
Walker++;\r
PrevWalker = Walker;\r
Index++;\r
}\r
}\r
\r
- if ((UINTN)(Walker - PrevWalker) == mGuidDataLen[Index]) {\r
+ if ((((UINTN)Walker - (UINTN)PrevWalker) / sizeof (CHAR16)) == mGuidDataLen[Index]) {\r
return TRUE;\r
} else {\r
return FALSE;\r
\r
Splitter2 = StrStr (Cwd, L":");\r
\r
- if ((UINTN) (Splitter1 - FullPath) != (UINTN) (Splitter2 - Cwd)) {\r
+ if (((UINTN) Splitter1 - (UINTN) FullPath) != ((UINTN) Splitter2 - (UINTN) Cwd)) {\r
return FALSE;\r
} else {\r
- if (StrniCmp (FullPath, Cwd, (UINTN) (Splitter1 - FullPath)) == NULL) {\r
+ if (StrniCmp (FullPath, Cwd, ((UINTN) Splitter1 - (UINTN) FullPath) / sizeof (CHAR16)) == NULL) {\r
return TRUE;\r
} else {\r
return FALSE;\r