mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-07 19:45:07 +02:00
MdeModulePkg Variable: type case VolatileBase to UINTN directly
Simplify ((UINTN) ((UINT8 *) VolatileBase + VolatileBase->Size)) to ((UINTN) VolatileBase + VolatileBase->Size) This patch prepares for adding emulated variable NV mode support in VariableRuntimeDxe. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Julien Grall <julien.grall@arm.com> Acked-by: Julien Grall <julien.grall@arm.com>
This commit is contained in:
parent
ebe34c96f4
commit
602cd0b6ba
@ -301,7 +301,7 @@ UpdateVariableStore (
|
||||
DataPtr += mVariableModuleGlobal->VariableGlobal.VolatileVariableBase;
|
||||
}
|
||||
|
||||
if ((DataPtr + DataSize) > ((UINTN) ((UINT8 *) VolatileBase + VolatileBase->Size))) {
|
||||
if ((DataPtr + DataSize) > ((UINTN) VolatileBase + VolatileBase->Size)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user