From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4F73681D31 for ; Fri, 28 Oct 2016 01:36:23 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 28 Oct 2016 01:36:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,557,1473145200"; d="scan'208,217";a="1051597115" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 28 Oct 2016 01:36:23 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 28 Oct 2016 01:36:22 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 28 Oct 2016 01:36:22 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.2]) with mapi id 14.03.0248.002; Fri, 28 Oct 2016 16:36:20 +0800 From: "Zhang, Chao B" To: Laszlo Ersek , "Zeng, Star" CC: edk2-devel-01 Thread-Topic: [edk2] [PATCH 40/47] SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE() Thread-Index: AQHSL7wPQYqo//Qet06k+KDvoVCnP6C7fZ8AgAIPiCA= Date: Fri, 28 Oct 2016 08:36:19 +0000 Message-ID: References: <20161026190504.9888-1-lersek@redhat.com> <20161026190504.9888-41-lersek@redhat.com> <1c78a137-2d0f-8ac2-da58-945639f1102e@redhat.com> In-Reply-To: <1c78a137-2d0f-8ac2-da58-945639f1102e@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTZiYmEwYTMtYTE3Mi00MWM3LTk2MGQtZmRiM2E0ZjkyNmQ5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZkMFJiaGdlVWxxXC80N2FDU0N3XC9JTEdmTyt1VVdqZ3RBRVRCMzVTa29yVT0ifQ== x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH 40/47] SecurityPkg/AuthVariableLib: 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: Fri, 28 Oct 2016 08:36:23 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chao Zhang Thanks & Best regards Chao Zhang From: Laszlo Ersek [mailto:lersek@redhat.com] Sent: Thursday, October 27, 2016 5:08 PM To: Zeng, Star; Zhang, Chao B Cc: edk2-devel-01 Subject: Re: [edk2] [PATCH 40/47] SecurityPkg/AuthVariableLib: rebase to AR= RAY_SIZE() Star, Chao, On 10/26/16 21:04, Laszlo Ersek wrote: > Cc: Chao Zhang > > Cc: Star Zeng > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek > > --- > SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/Secu= rityPkg/Library/AuthVariableLib/AuthVariableLib.c > index c4fbb649f1fd..792a1232aed9 100644 > --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c > +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c > @@ -421,7 +421,7 @@ AuthVariableLibInitialize ( > AuthVarLibContextOut->StructVersion =3D AUTH_VAR_LIB_CONTEXT_OUT_STRUC= T_VERSION; > AuthVarLibContextOut->StructSize =3D sizeof (AUTH_VAR_LIB_CONTEXT_OUT)= ; > AuthVarLibContextOut->AuthVarEntry =3D mAuthVarEntry; > - AuthVarLibContextOut->AuthVarEntryCount =3D sizeof (mAuthVarEntry) / s= izeof (mAuthVarEntry[0]); > + AuthVarLibContextOut->AuthVarEntryCount =3D ARRAY_SIZE (mAuthVarEntry)= ; > mAuthVarAddressPointer[0] =3D (VOID **) &mPubKeyStore; > mAuthVarAddressPointer[1] =3D (VOID **) &mCertDbStore; > mAuthVarAddressPointer[2] =3D (VOID **) &mHashCtx; > @@ -433,7 +433,7 @@ AuthVariableLibInitialize ( > mAuthVarAddressPointer[8] =3D (VOID **) &(mAuthVarLibContextIn->CheckR= emainingSpaceForConsistency), > mAuthVarAddressPointer[9] =3D (VOID **) &(mAuthVarLibContextIn->AtRunt= ime), > AuthVarLibContextOut->AddressPointer =3D mAuthVarAddressPointer; > - AuthVarLibContextOut->AddressPointerCount =3D sizeof (mAuthVarAddressP= ointer) / sizeof (mAuthVarAddressPointer[0]); > + AuthVarLibContextOut->AddressPointerCount =3D ARRAY_SIZE (mAuthVarAddr= essPointer); > > return Status; > } > can one of you guys please review this patch? Thanks! Laszlo