MdeModulePkg Variable: Update Pointer Minus with UINTN type
authorLiming Gao <liming.gao@intel.com>
Tue, 26 Dec 2017 08:34:10 +0000 (16:34 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 26 Dec 2017 09:46:30 +0000 (17:46 +0800)
In V2, reduce unnecessary () in the expression.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c

index 77905a0..2632211 100644 (file)
@@ -4125,7 +4125,7 @@ ConvertNormalVarStorageToAuthVarStorage (
   //\r
   AuthVarStorage->Format = NormalVarStorage->Format;\r
   AuthVarStorage->State  = NormalVarStorage->State;\r
   //\r
   AuthVarStorage->Format = NormalVarStorage->Format;\r
   AuthVarStorage->State  = NormalVarStorage->State;\r
-  AuthVarStorage->Size = (UINT32) (UINTN) ((UINT8 *) AuthStartPtr - (UINT8 *) AuthVarStorage);\r
+  AuthVarStorage->Size = (UINT32)((UINTN)AuthStartPtr - (UINTN)AuthVarStorage);\r
   CopyGuid (&AuthVarStorage->Signature, &gEfiAuthenticatedVariableGuid);\r
   ASSERT (AuthVarStorage->Size <= AuthVarStroageSize);\r
 \r
   CopyGuid (&AuthVarStorage->Signature, &gEfiAuthenticatedVariableGuid);\r
   ASSERT (AuthVarStorage->Size <= AuthVarStroageSize);\r
 \r