Reviewed-by: Ruiyu Ni <ruiyu...@intel.com>
>-----Original Message-----
>From: Laszlo Ersek [mailto:ler...@redhat.com]
>Sent: Thursday, October 27, 2016 3:05 AM
>To: edk2-devel-01 <edk2-de...@ml01.01.org>
>Cc: Ni, Ruiyu <ruiyu...@intel.com>
>Subject: [PATCH 36/47] OptionRomPkg/AtapiPassThruDxe: rebase to ARRAY_SIZE()
>
>Cc: Ruiyu Ni <ruiyu...@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Laszlo Ersek <ler...@redhat.com>
>---
> OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c 
>b/OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c
>index 3578a1e4459c..e2654e5c2566 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++) {
>
>--
>2.9.2
>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to