diff mbox

[edk2,28/47] MdeModulePkg/BdsDxe: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-29-lersek@redhat.com
State Accepted
Commit 1a5afd71270b93beda5eb57065d1e43ba3abe8eb
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:04 p.m. UTC
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>

---
 MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ni, Ruiyu Oct. 27, 2016, 1:50 a.m. UTC | #1
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>


Regards,
Ray

>-----Original Message-----

>From: Laszlo Ersek [mailto:lersek@redhat.com]

>Sent: Thursday, October 27, 2016 3:05 AM

>To: edk2-devel-01 <edk2-devel@ml01.01.org>

>Cc: Tian, Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Zeng, Star <star.zeng@intel.com>

>Subject: [PATCH 28/47] MdeModulePkg/BdsDxe: 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>

>---

> MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 2 +-

> 1 file changed, 1 insertion(+), 1 deletion(-)

>

>diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c

>index c86cd7a576ad..aacc4a64794d 100644

>--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c

>+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c

>@@ -654,7 +654,7 @@ BdsEntry (

>   Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);

>   DEBUG ((EFI_D_INFO, "[BdsDxe] Locate Variable Lock protocol - %r\n", Status));

>   if (!EFI_ERROR (Status)) {

>-    for (Index = 0; Index < sizeof (mReadOnlyVariables) / sizeof (mReadOnlyVariables[0]); Index++) {

>+    for (Index = 0; Index < ARRAY_SIZE (mReadOnlyVariables); Index++) {

>       Status = VariableLock->RequestToLock (VariableLock, mReadOnlyVariables[Index], &gEfiGlobalVariableGuid);

>       ASSERT_EFI_ERROR (Status);

>     }

>--

>2.9.2

>


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ni, Ruiyu Oct. 27, 2016, 1:50 a.m. UTC | #2
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>


Regards,
Ray

>-----Original Message-----

>From: Laszlo Ersek [mailto:lersek@redhat.com]

>Sent: Thursday, October 27, 2016 3:05 AM

>To: edk2-devel-01 <edk2-devel@ml01.01.org>

>Cc: Tian, Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Zeng, Star <star.zeng@intel.com>

>Subject: [PATCH 28/47] MdeModulePkg/BdsDxe: 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>

>---

> MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 2 +-

> 1 file changed, 1 insertion(+), 1 deletion(-)

>

>diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c

>index c86cd7a576ad..aacc4a64794d 100644

>--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c

>+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c

>@@ -654,7 +654,7 @@ BdsEntry (

>   Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);

>   DEBUG ((EFI_D_INFO, "[BdsDxe] Locate Variable Lock protocol - %r\n", Status));

>   if (!EFI_ERROR (Status)) {

>-    for (Index = 0; Index < sizeof (mReadOnlyVariables) / sizeof (mReadOnlyVariables[0]); Index++) {

>+    for (Index = 0; Index < ARRAY_SIZE (mReadOnlyVariables); Index++) {

>       Status = VariableLock->RequestToLock (VariableLock, mReadOnlyVariables[Index], &gEfiGlobalVariableGuid);

>       ASSERT_EFI_ERROR (Status);

>     }

>--

>2.9.2

>


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index c86cd7a576ad..aacc4a64794d 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -654,7 +654,7 @@  BdsEntry (
   Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);
   DEBUG ((EFI_D_INFO, "[BdsDxe] Locate Variable Lock protocol - %r\n", Status));
   if (!EFI_ERROR (Status)) {
-    for (Index = 0; Index < sizeof (mReadOnlyVariables) / sizeof (mReadOnlyVariables[0]); Index++) {
+    for (Index = 0; Index < ARRAY_SIZE (mReadOnlyVariables); Index++) {
       Status = VariableLock->RequestToLock (VariableLock, mReadOnlyVariables[Index], &gEfiGlobalVariableGuid);
       ASSERT_EFI_ERROR (Status);
     }