diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2023-09-06 10:35:11 -0400 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-09-08 14:21:04 +0000 |
commit | 60d0f5802bceab3482c6be6dfde73a2af8373f9f (patch) | |
tree | ad656aa09ede43a61a9aa6b6a12e0f04c3c9bfb1 /MdePkg/Library | |
parent | b74f1f7ab5e956f58ae1771dc4e2a4b92bc51430 (diff) | |
download | edk2-60d0f5802bceab3482c6be6dfde73a2af8373f9f.tar.gz edk2-60d0f5802bceab3482c6be6dfde73a2af8373f9f.tar.bz2 edk2-60d0f5802bceab3482c6be6dfde73a2af8373f9f.zip |
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>
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/TdxLib/Rtmr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Library/TdxLib/Rtmr.c b/MdePkg/Library/TdxLib/Rtmr.c index a0283966b3..cbf1dda7bc 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;
|