From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: chasel.chiu@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Mon, 02 Sep 2019 07:04:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2019 07:04:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,459,1559545200"; d="scan'208";a="176327900" Received: from pgsmsx114.gar.corp.intel.com ([10.108.55.203]) by orsmga008.jf.intel.com with ESMTP; 02 Sep 2019 07:04:42 -0700 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.22]) by pgsmsx114.gar.corp.intel.com ([169.254.4.237]) with mapi id 14.03.0439.000; Mon, 2 Sep 2019 22:04:41 +0800 From: "Chiu, Chasel" To: "Zhang, Shenglei" , "devel@edk2.groups.io" CC: "Kubacki, Michael A" , "Desimone, Nathaniel L" , "Gao, Liming" Subject: Re: [PATCH] MinPlatformPkg/TestPointCheckLib: Add return value when OutTable is NULL Thread-Topic: [PATCH] MinPlatformPkg/TestPointCheckLib: Add return value when OutTable is NULL Thread-Index: AQHVYYrYne0oKSLjaUmA1bHfwphwMacYa1Ag Date: Mon, 2 Sep 2019 14:04:41 +0000 Message-ID: <3C3EFB470A303B4AB093197B6777CCEC5047E76B@PGSMSX111.gar.corp.intel.com> References: <20190902123452.27716-1-shenglei.zhang@intel.com> <20190902123452.27716-2-shenglei.zhang@intel.com> In-Reply-To: <20190902123452.27716-2-shenglei.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjEwYTU4MTktZmI1MS00YWIxLWEwMjctZDM4MzJmODc1Y2FlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMnd6OHphSjFjdHI3Y1VrR2dOZnlxUnk1bmFNVkdSMVFwRm5yRFRcL1RneHF1T045Wk9cL2JDblZDcHZWdGhwZnFoIn0= x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.205] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Extend copyright and please follow the coding style: if () { ... } else { ... } > -----Original Message----- > From: Zhang, Shenglei > Sent: Monday, September 2, 2019 8:35 PM > To: devel@edk2.groups.io > Cc: Kubacki, Michael A ; Chiu, Chasel > ; Desimone, Nathaniel L > ; Gao, Liming > Subject: [PATCH] MinPlatformPkg/TestPointCheckLib: Add return value when > OutTable is NULL >=20 > Currently there is no check for the parameter OutTable. > So add the logic that return value EFI_INVALID_PARAMETER when the > OutTable is NULL. >=20 > Cc: Michael Kubacki > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Liming Gao > Signed-off-by: Shenglei Zhang > --- > .../Test/Library/TestPointCheckLib/DxeCheckAcpi.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git > a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckA > cpi.c > b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckA > cpi.c > index 263781a2..3828ab72 100644 > --- > a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckA > cpi.c > +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCh > +++ eckAcpi.c > @@ -611,6 +611,9 @@ DumpAcpiRsdt ( > if (OutTable !=3D NULL) { > *OutTable =3D NULL; > } > + else{ > + return EFI_INVALID_PARAMETER; > + } >=20 > ReturnStatus =3D EFI_SUCCESS; > EntryCount =3D (Rsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / > sizeof(UINT32); @@ -664,6 +667,9 @@ DumpAcpiXsdt ( > if (OutTable !=3D NULL) { > *OutTable =3D NULL; > } > + else{ > + return EFI_INVALID_PARAMETER; > + } >=20 > ReturnStatus =3D EFI_SUCCESS; > EntryCount =3D (Xsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / > sizeof(UINT64); > -- > 2.18.0.windows.1