From 10da3a156ff7d24ace6113de323ffc515506d6de Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 Oct 2016 19:19:54 +0200 Subject: 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 --- OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OptionRomPkg/AtapiPassThruDxe') 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++) { -- cgit v1.2.3