OptionRomPkg/AtapiPassThruDxe: 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>
This commit is contained in:
Laszlo Ersek 2016-10-26 19:19:54 +02:00
parent ff43fd5ddf
commit 10da3a156f
1 changed files with 2 additions and 2 deletions

View File

@ -1752,7 +1752,7 @@ Returns:
UINT8 ArrayLen; UINT8 ArrayLen;
OpCode = (UINT8 *) (Packet->Cdb); 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++) { for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof (SCSI_COMMAND_SET)) != 0); Index++) {
@ -1995,7 +1995,7 @@ Returns:
UINT8 ArrayLen; UINT8 ArrayLen;
OpCode = (UINT8 *) (Packet->Cdb); 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++) { for (Index = 0; (Index < ArrayLen) && (CompareMem (&gSupportedATAPICommands[Index], &gEndTable, sizeof (SCSI_COMMAND_SET)) != 0); Index++) {