Reviewed-by: Liming Gao <gaolim...@byosoft.com.cn> > -----邮件原件----- > 发件人: Yao, Jiewen <jiewen....@intel.com> > 发送时间: 2023年9月7日 7:32 > 收件人: devel@edk2.groups.io; mikub...@linux.microsoft.com > 抄送: Kinney, Michael D <michael.d.kin...@intel.com>; Gao, Liming > <gaolim...@byosoft.com.cn>; Liu, Zhiguang <zhiguang....@intel.com>; > Rebecca Cran <rebe...@bsdio.com> > 主题: RE: [edk2-devel] [PATCH v1 1/1] MdePkg/Library/TdxLib: Remove > unnecessary comparison > > Reviewed-by: Jiewen Yao <jiewen....@intel.com> > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael > > Kubacki > > Sent: Thursday, September 7, 2023 1:34 AM > > To: devel@edk2.groups.io > > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Gao, Liming > > <gaolim...@byosoft.com.cn>; Liu, Zhiguang <zhiguang....@intel.com>; > Rebecca > > Cran <rebe...@bsdio.com> > > Subject: [edk2-devel] [PATCH v1 1/1] MdePkg/Library/TdxLib: Remove > > unnecessary comparison > > > > From: Michael Kubacki <michael.kuba...@microsoft.com> > > > > Removes the comparison since unsigned values are always greater than > > or equal to 0. > > > > See the following CodeQL query for more info: > > /cpp/cpp-unsigned-comparison-zero/ > > > > Cc: Michael D Kinney <michael.d.kin...@intel.com> > > Cc: Liming Gao <gaolim...@byosoft.com.cn> > > Cc: Zhiguang Liu <zhiguang....@intel.com> > > Cc: Rebecca Cran <rebe...@bsdio.com> > > Signed-off-by: Michael Kubacki <michael.kuba...@microsoft.com> > > --- > > MdePkg/Library/TdxLib/Rtmr.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/MdePkg/Library/TdxLib/Rtmr.c b/MdePkg/Library/TdxLib/Rtmr.c > > index a0283966b353..cbf1dda7bcff 100644 > > --- a/MdePkg/Library/TdxLib/Rtmr.c > > +++ b/MdePkg/Library/TdxLib/Rtmr.c > > @@ -51,7 +51,7 @@ TdExtendRtmr ( > > > > ASSERT (Data != NULL); > > ASSERT (DataLen == SHA384_DIGEST_SIZE); > > - ASSERT (Index >= 0 && Index < RTMR_COUNT); > > + ASSERT (Index < RTMR_COUNT); > > > > if ((Data == NULL) || (DataLen != SHA384_DIGEST_SIZE) || (Index >= > > RTMR_COUNT)) { > > return EFI_INVALID_PARAMETER; > > -- > > 2.42.0.windows.2 > > > > > > > > -=-=-=-=-=-= > > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#108335): > https://edk2.groups.io/g/devel/message/108335 > > Mute This Topic: https://groups.io/mt/101198214/1772286 > > Group Owner: devel+ow...@edk2.groups.io > > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [jiewen....@intel.com] > > -=-=-=-=-=-= > >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108427): https://edk2.groups.io/g/devel/message/108427 Mute This Topic: https://groups.io/mt/101228289/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-