On 26 December 2017 at 08:36, Liming Gao <[email protected]> wrote: > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Liming Gao <[email protected]> > Cc: Star Zeng <[email protected]>
Could you please add an explanation why this is necessary? Do we really need 5 (!) casts to perform a simple subtraction? > --- > MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > index 77905a0..a47270a 100644 > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > @@ -4125,7 +4125,7 @@ ConvertNormalVarStorageToAuthVarStorage ( > // > AuthVarStorage->Format = NormalVarStorage->Format; > AuthVarStorage->State = NormalVarStorage->State; > - AuthVarStorage->Size = (UINT32) (UINTN) ((UINT8 *) AuthStartPtr - (UINT8 > *) AuthVarStorage); > + AuthVarStorage->Size = (UINT32)((UINTN) (UINT8 *) AuthStartPtr - (UINTN) > (UINT8 *) AuthVarStorage); > CopyGuid (&AuthVarStorage->Signature, &gEfiAuthenticatedVariableGuid); > ASSERT (AuthVarStorage->Size <= AuthVarStroageSize); > > -- > 2.8.0.windows.1 > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

