diff mbox

[edk2,35/47] Nt32Pkg/WinNtSerialIoDxe: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-36-lersek@redhat.com
State Accepted
Commit ff43fd5ddfba8118639aa1da6c3745df8d5993c2
Headers show

Commit Message

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

---
 Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.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:49 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: Ni, Ruiyu <ruiyu.ni@intel.com>

>Subject: [PATCH 35/47] Nt32Pkg/WinNtSerialIoDxe: rebase to ARRAY_SIZE()

>

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

>Contributed-under: TianoCore Contribution Agreement 1.0

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

>---

> Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c | 2 +-

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

>

>diff --git a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c

>index 0dc031393e71..23d3329d9db1 100644

>--- a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c

>+++ b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c

>@@ -984,7 +984,7 @@ Returns:

>   //The lower baud rate supported by the serial device will be selected without exceeding the unsupported BaudRate

>parameter

>   //

>

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

>+  for (Index = 1; Index < (ARRAY_SIZE (mBaudRateCurrentSupport)); Index++) {

>     if (BaudRate < mBaudRateCurrentSupport[Index]) {

>       BaudRate = mBaudRateCurrentSupport[Index-1];

>       break;

>--

>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/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c
index 0dc031393e71..23d3329d9db1 100644
--- a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c
+++ b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c
@@ -984,7 +984,7 @@  Returns:
   //The lower baud rate supported by the serial device will be selected without exceeding the unsupported BaudRate parameter
   // 
   
-  for (Index = 1; Index < (sizeof (mBaudRateCurrentSupport) / sizeof (mBaudRateCurrentSupport[0])); Index++) {
+  for (Index = 1; Index < (ARRAY_SIZE (mBaudRateCurrentSupport)); Index++) {
     if (BaudRate < mBaudRateCurrentSupport[Index]) {
       BaudRate = mBaudRateCurrentSupport[Index-1];
       break;