From: Laszlo Ersek Date: Wed, 26 Oct 2016 17:18:58 +0000 (+0200) Subject: Nt32Pkg/WinNtSerialIoDxe: rebase to ARRAY_SIZE() X-Git-Tag: edk2-stable201903~5447 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=ff43fd5ddfba8118639aa1da6c3745df8d5993c2 Nt32Pkg/WinNtSerialIoDxe: rebase to ARRAY_SIZE() Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Ruiyu Ni Reviewed-by: Jordan Justen --- diff --git a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c index 0dc031393e..23d3329d9d 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;