diff options
author | Star Zeng <star.zeng@intel.com> | 2019-01-14 22:15:08 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2019-01-24 10:52:34 +0800 |
commit | 602cd0b6ba0e78bd2442770c2f69e5b44463e6ae (patch) | |
tree | 82d2d66eb0209821c352a56f4354dd1b406c19ca /MdeModulePkg/Universal | |
parent | ebe34c96f473b9b7389f1f05a29c0bdb3fe36ac3 (diff) | |
download | edk2-602cd0b6ba0e78bd2442770c2f69e5b44463e6ae.tar.gz edk2-602cd0b6ba0e78bd2442770c2f69e5b44463e6ae.tar.bz2 edk2-602cd0b6ba0e78bd2442770c2f69e5b44463e6ae.zip |
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>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 14684b3fed..d3df21819a 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -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;
}
|