diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-10-26 19:19:54 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-10-27 11:10:58 +0200 |
commit | 10da3a156ff7d24ace6113de323ffc515506d6de (patch) | |
tree | d6ac4950607d1d79eb4c3336e3392b9f66b107cc | |
parent | ff43fd5ddfba8118639aa1da6c3745df8d5993c2 (diff) | |
download | edk2-platforms-10da3a156ff7d24ace6113de323ffc515506d6de.tar.xz |
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>
-rw-r--r-- | OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.c | 4 |
1 files changed, 2 insertions, 2 deletions
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++) {
|