MdePkg/Library/TdxLib: Remove unnecessary comparison

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.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
This commit is contained in:
Michael Kubacki 2023-09-06 10:35:11 -04:00 committed by mergify[bot]
parent b74f1f7ab5
commit 60d0f5802b
1 changed files with 1 additions and 1 deletions

View File

@ -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;