From: Laszlo Ersek Date: Wed, 26 Oct 2016 17:19:54 +0000 (+0200) Subject: OptionRomPkg/AtapiPassThruDxe: rebase to ARRAY_SIZE() X-Git-Tag: edk2-stable201903~5446 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=10da3a156ff7d24ace6113de323ffc515506d6de;ds=sidebyside OptionRomPkg/AtapiPassThruDxe: 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/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c index 3578a1e445..e2654e5c25 100644 --- a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c +++ b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c @@ -1752,7 +1752,7 @@ Returns: UINT8 ArrayLen; OpCode = (UINT8 *) (Packet->Cdb); - ArrayLen = (UINT8) (sizeof (gSupportedATAPICommands) / sizeof (gSupportedATAPICommands[0])); + ArrayLen = (UINT8) (ARRAY_SIZE (gSupportedATAPICommands)); for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof (SCSI_COMMAND_SET)) != 0); Index++) { @@ -1995,7 +1995,7 @@ Returns: UINT8 ArrayLen; OpCode = (UINT8 *) (Packet->Cdb); - ArrayLen = (UINT8) (sizeof (gSupportedATAPICommands) / sizeof (gSupportedATAPICommands[0])); + ArrayLen = (UINT8) (ARRAY_SIZE (gSupportedATAPICommands)); for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof (SCSI_COMMAND_SET)) != 0); Index++) {