summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 19:05:48 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 11:10:56 +0200
commitf0209935adfc0af448574eca7808691df36c8ea4 (patch)
tree7e33cfde61deb9eb4fddd3ab9fbc458c8233c62a /MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
parenta031a53fa499f7be8a71d0c76134de6392495548 (diff)
downloadedk2-f0209935adfc0af448574eca7808691df36c8ea4.zip
edk2-f0209935adfc0af448574eca7808691df36c8ea4.tar.gz
edk2-f0209935adfc0af448574eca7808691df36c8ea4.tar.bz2
MdeModulePkg/UefiBootManagerLib: rebase to ARRAY_SIZE()
Cc: Feng Tian <feng.tian@intel.com> Cc: Ruiyu Ni <ruiyu.ni@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: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
index 9af98de..e638e5f 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
@@ -796,7 +796,7 @@ EfiBootManagerIsValidLoadOptionVariableName (
return FALSE;
}
- for (Index = 0; Index < sizeof (mBmLoadOptionName) / sizeof (mBmLoadOptionName[0]); Index++) {
+ for (Index = 0; Index < ARRAY_SIZE (mBmLoadOptionName); Index++) {
if ((VariableNameLen - 4 == StrLen (mBmLoadOptionName[Index])) &&
(StrnCmp (VariableName, mBmLoadOptionName[Index], VariableNameLen - 4) == 0)
) {
@@ -804,7 +804,7 @@ EfiBootManagerIsValidLoadOptionVariableName (
}
}
- if (Index == sizeof (mBmLoadOptionName) / sizeof (mBmLoadOptionName[0])) {
+ if (Index == ARRAY_SIZE (mBmLoadOptionName)) {
return FALSE;
}