Nt32Pkg/WinNtSerialIoDxe: rebase to ARRAY_SIZE()
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 Oct 2016 17:18:58 +0000 (19:18 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 27 Oct 2016 09:10:58 +0000 (11:10 +0200)
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>
Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c

index 0dc0313..23d3329 100644 (file)
@@ -984,7 +984,7 @@ Returns:
   //The lower baud rate supported by the serial device will be selected without exceeding the unsupported BaudRate parameter\r
   // \r
   \r
-  for (Index = 1; Index < (sizeof (mBaudRateCurrentSupport) / sizeof (mBaudRateCurrentSupport[0])); Index++) {\r
+  for (Index = 1; Index < (ARRAY_SIZE (mBaudRateCurrentSupport)); Index++) {\r
     if (BaudRate < mBaudRateCurrentSupport[Index]) {\r
       BaudRate = mBaudRateCurrentSupport[Index-1];\r
       break;\r