From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mx.groups.io with SMTP id smtpd.web09.8456.1618317430015137466 for ; Tue, 13 Apr 2021 05:37:10 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.32, mailfrom: xiewenyi2@huawei.com) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FKQ6q0C14zlXjT; Tue, 13 Apr 2021 20:35:15 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Tue, 13 Apr 2021 20:36:57 +0800 From: "wenyi,xie" To: , , , CC: , Subject: [PATCH EDK2 v1 1/1] SecurityPkg/FvReportPei: remove redundant sizeof Date: Tue, 13 Apr 2021 20:33:37 +0800 Message-ID: <1618317217-112644-2-git-send-email-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1618317217-112644-1-git-send-email-xiewenyi2@huawei.com> References: <1618317217-112644-1-git-send-email-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3333 In function InstallPreHashFvPpi, when calculatuing the size of struct HASH_INFO=EF=BC=8Csizeof is used twice. Cc: Jiewen Yao Cc: Jian J Wang Cc: Laszlo Ersek Signed-off-by: Wenyi Xie --- SecurityPkg/FvReportPei/FvReportPei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecurityPkg/FvReportPei/FvReportPei.c b/SecurityPkg/FvReport= Pei/FvReportPei.c index d709760ea3ce..e82413e090c0 100644 --- a/SecurityPkg/FvReportPei/FvReportPei.c +++ b/SecurityPkg/FvReportPei/FvReportPei.c @@ -67,7 +67,7 @@ InstallPreHashFvPpi ( HASH_INFO *HashInfo; =20 PpiSize =3D sizeof (EDKII_PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_PPI) - + sizeof (sizeof (HASH_INFO)) + + sizeof (HASH_INFO) + HashSize; =20 PreHashedFvPpi =3D AllocatePool (PpiSize); --=20 2.20.1.windows.1