summaryrefslogtreecommitdiff
path: root/SecurityPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 19:25:30 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 11:15:20 +0200
commit3318f89344a35539dac0fe7090fc44faf172dc15 (patch)
treeb7b5998eb60f11171595f9d798e70f8e7e134a16 /SecurityPkg
parentfcfba04abd20f1d164022a361607a06083f5c6ee (diff)
downloadedk2-3318f89344a35539dac0fe7090fc44faf172dc15.zip
edk2-3318f89344a35539dac0fe7090fc44faf172dc15.tar.gz
edk2-3318f89344a35539dac0fe7090fc44faf172dc15.tar.bz2
SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE()
Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
index c4fbb64..792a123 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;
}