summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/DebugPortDxe/DebugPort.c4
-rw-r--r--MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c4
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Image.c4
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c10
4 files changed, 11 insertions, 11 deletions
diff --git a/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c b/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
index 298b6b2..dcb623c 100644
--- a/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
+++ b/MdeModulePkg/Universal/DebugPortDxe/DebugPort.c
@@ -4,7 +4,7 @@
ALL CODE IN THE SERIALIO STACK MUST BE RE-ENTRANT AND CALLABLE FROM
INTERRUPT CONTEXT
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -569,7 +569,7 @@ DebugPortRead (
LocalBufferSize = *BufferSize - (BufferPtr - (UINT8 *) Buffer);
} while (LocalBufferSize != 0 && Timeout > 0);
- *BufferSize = (UINTN) (BufferPtr - (UINT8 *) Buffer);
+ *BufferSize = (UINTN) BufferPtr - (UINTN) Buffer;
return Status;
}
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
index 2e3e8c7..49e747b 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
@@ -3,7 +3,7 @@
These are the common Fault Tolerant Write (FTW) functions that are shared
by DXE FTW driver and SMM FTW driver.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -373,7 +373,7 @@ FtwWrite (
//
// If Record is out of the range of Header, return access denied.
//
- if (((UINTN)((UINT8 *) Record - (UINT8 *) Header)) > FTW_WRITE_TOTAL_SIZE (Header->NumberOfWrites - 1, Header->PrivateDataSize)) {
+ if (((UINTN) Record - (UINTN) Header) > FTW_WRITE_TOTAL_SIZE (Header->NumberOfWrites - 1, Header->PrivateDataSize)) {
return EFI_ACCESS_DENIED;
}
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index 1668828..e2fa16e 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -2,7 +2,7 @@
Implementation for EFI_HII_IMAGE_PROTOCOL.
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1124,7 +1124,7 @@ HiiSetImage (
return EFI_OUT_OF_RESOURCES;
}
- Part1Size = (UINT32) (UINTN) ((UINT8 *) CurrentImageBlock - (UINT8 *) ImagePackage->ImageBlock);
+ Part1Size = (UINT32) ((UINTN) CurrentImageBlock - (UINTN) ImagePackage->ImageBlock);
Part2Size = ImagePackage->ImageBlockSize - Part1Size - OldBlockSize;
CopyMem (ImageBlocks, ImagePackage->ImageBlock, Part1Size);
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index f5b6a5f..b0c7434 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -16,7 +16,7 @@
VariableServiceSetVariable() should also check authenticate data to avoid buffer overflow,
integer overflow. It should also check attribute to avoid authentication bypass.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1170,7 +1170,7 @@ Reclaim (
// Install the new variable if it is not NULL.
//
if (NewVariable != NULL) {
- if ((UINTN) (CurrPtr - ValidBuffer) + NewVariableSize > VariableStoreHeader->Size) {
+ if (((UINTN) CurrPtr - (UINTN) ValidBuffer) + NewVariableSize > VariableStoreHeader->Size) {
//
// No enough space to store the new variable.
//
@@ -1211,8 +1211,8 @@ Reclaim (
// If volatile variable store, just copy valid buffer.
//
SetMem ((UINT8 *) (UINTN) VariableBase, VariableStoreHeader->Size, 0xff);
- CopyMem ((UINT8 *) (UINTN) VariableBase, ValidBuffer, (UINTN) (CurrPtr - ValidBuffer));
- *LastVariableOffset = (UINTN) (CurrPtr - ValidBuffer);
+ CopyMem ((UINT8 *) (UINTN) VariableBase, ValidBuffer, (UINTN) CurrPtr - (UINTN) ValidBuffer);
+ *LastVariableOffset = (UINTN) CurrPtr - (UINTN) ValidBuffer;
Status = EFI_SUCCESS;
} else {
//
@@ -1223,7 +1223,7 @@ Reclaim (
(VARIABLE_STORE_HEADER *) ValidBuffer
);
if (!EFI_ERROR (Status)) {
- *LastVariableOffset = (UINTN) (CurrPtr - ValidBuffer);
+ *LastVariableOffset = (UINTN) CurrPtr - (UINTN) ValidBuffer;
mVariableModuleGlobal->HwErrVariableTotalSize = HwErrVariableTotalSize;
mVariableModuleGlobal->CommonVariableTotalSize = CommonVariableTotalSize;
mVariableModuleGlobal->CommonUserVariableTotalSize = CommonUserVariableTotalSize;