diff mbox

[edk2,42/47] ShellPkg/UefiShellLevel2CommandsLib: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-43-lersek@redhat.com
State Accepted
Commit fe6c62fc0cc9931ce7ff921995cd2c1936f6b8b8
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:04 p.m. UTC
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.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:47 a.m. UTC | #1
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

>-----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: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>

>Subject: [PATCH 42/47] ShellPkg/UefiShellLevel2CommandsLib: rebase to ARRAY_SIZE()

>

>Cc: Jaben Carsey <jaben.carsey@intel.com>

>Cc: Ruiyu Ni <ruiyu.ni@intel.com>

>Contributed-under: TianoCore Contribution Agreement 1.0

>Signed-off-by: Laszlo Ersek <lersek@redhat.com>

>---

> ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c | 2 +-

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

>

>diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c

>b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c

>index 3ebc72a0afa8..5383cffe879c 100644

>--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c

>+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c

>@@ -942,7 +942,7 @@ ShellCommandRunTimeZone (

>         //

>         if (ShellCommandLineGetFlag (Package, L"-f")) {

>           for ( LoopVar = 0

>-              ; LoopVar < sizeof (TimeZoneList) / sizeof (TimeZoneList[0])

>+              ; LoopVar < ARRAY_SIZE (TimeZoneList)

>               ; LoopVar++

>              ){

>             if (TheTime.TimeZone == TimeZoneList[LoopVar].TimeZone) {

>--

>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/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
index 3ebc72a0afa8..5383cffe879c 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
@@ -942,7 +942,7 @@  ShellCommandRunTimeZone (
         //
         if (ShellCommandLineGetFlag (Package, L"-f")) {
           for ( LoopVar = 0
-              ; LoopVar < sizeof (TimeZoneList) / sizeof (TimeZoneList[0])
+              ; LoopVar < ARRAY_SIZE (TimeZoneList)
               ; LoopVar++
              ){
             if (TheTime.TimeZone == TimeZoneList[LoopVar].TimeZone) {