From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0DF3E1A1E43 for ; Wed, 26 Oct 2016 18:20:08 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP; 26 Oct 2016 18:20:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,551,1473145200"; d="scan'208";a="24153510" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 26 Oct 2016 18:20:06 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 18:20:06 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 18:20:06 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.209]) with mapi id 14.03.0248.002; Thu, 27 Oct 2016 09:20:05 +0800 From: "Gao, Liming" To: Laszlo Ersek , edk2-devel-01 Thread-Topic: [PATCH 13/47] EdkCompatibilityPkg/Sample/Tools: rebase to ARRAY_SIZE() Thread-Index: AQHSL7v0E5rVvNR2gUyHCEj/BtZTUKC7gP6A Date: Thu, 27 Oct 2016 01:20:04 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B49A1CE@shsmsx102.ccr.corp.intel.com> References: <20161026190504.9888-1-lersek@redhat.com> <20161026190504.9888-14-lersek@redhat.com> In-Reply-To: <20161026190504.9888-14-lersek@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTVjY2FkZDUtMmU2My00NTJhLTlhYmYtM2Q2YjI4Mjk3MGMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Iktqa1kxMmNQaGVhSVZCZDJUYXhMb1RWTUp5NWNwTGR6NXlsMDViNnczTm89In0= x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 13/47] EdkCompatibilityPkg/Sample/Tools: rebase to ARRAY_SIZE() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 01:20:08 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao -----Original Message----- From: Laszlo Ersek [mailto:lersek@redhat.com]=20 Sent: Thursday, October 27, 2016 3:05 AM To: edk2-devel-01 Cc: Gao, Liming Subject: [PATCH 13/47] EdkCompatibilityPkg/Sample/Tools: rebase to ARRAY_SI= ZE() Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c | 4 ++-- EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c b/EdkC= ompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c index cf8efc86e1b4..f787ae81c2b3 100644 --- a/EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c +++ b/EdkCompatibilityPkg/Sample/Tools/Source/EfiRom/EfiRom.c @@ -397,8 +397,8 @@ GetCodeTypeStr ( UINT8 CodeType ) { - if (CodeType >=3D sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr)) { - CodeType =3D sizeof (mCodeTypeStr) / sizeof (*mCodeTypeStr) - 1; + if (CodeType >=3D ARRAY_SIZE (mCodeTypeStr)) { + CodeType =3D ARRAY_SIZE (mCodeTypeStr) - 1; } return mCodeTypeStr[CodeType]; } diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c b/E= dkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c index e69af5c25932..e60a2d9eeb30 100644 --- a/EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c +++ b/EdkCompatibilityPkg/Sample/Tools/Source/HiiPack/IfrParse.c @@ -470,7 +470,7 @@ static const IFR_PARSE_TABLE_ENTRY mIfrParseTable[] = =3D { IfrParse2A }, }; -#define PARSE_TABLE_ENTRIES (sizeof (mIfrParseTable) / sizeof (mIfrParseTa= ble[0])) +#define PARSE_TABLE_ENTRIES (ARRAY_SIZE (mIfrParseTable)) =20 static STATUS --=20 2.9.2