X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OptionRomPkg%2FAtapiPassThruDxe%2FAtapiPassThru.c;h=e2654e5c25662b8f373928154f0bfe7ae5fa7e6f;hp=3578a1e4459c97cd13bf167e53c39cb78714c783;hb=10da3a156ff7d24ace6113de323ffc515506d6de;hpb=ff43fd5ddfba8118639aa1da6c3745df8d5993c2 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++) {