From 3318f89344a35539dac0fe7090fc44faf172dc15 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 Oct 2016 19:25:30 +0200 Subject: SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE() Cc: Chao Zhang Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen Reviewed-by: Star Zeng --- SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SecurityPkg') diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c index c4fbb649f1..792a1232ae 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c @@ -421,7 +421,7 @@ AuthVariableLibInitialize ( AuthVarLibContextOut->StructVersion = AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION; AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT); AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry; - AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / sizeof (mAuthVarEntry[0]); + AuthVarLibContextOut->AuthVarEntryCount = ARRAY_SIZE (mAuthVarEntry); mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore; mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore; mAuthVarAddressPointer[2] = (VOID **) &mHashCtx; @@ -433,7 +433,7 @@ AuthVariableLibInitialize ( mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency), mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime), AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer; - AuthVarLibContextOut->AddressPointerCount = sizeof (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]); + AuthVarLibContextOut->AddressPointerCount = ARRAY_SIZE (mAuthVarAddressPointer); return Status; } -- cgit v1.2.3