Browse Source

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>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Laszlo Ersek 7 years ago
parent
commit
ff43fd5ddf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c

+ 1 - 1
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;