diff options
author | Parth <56894451+parthishere@users.noreply.github.com> | 2024-08-06 11:49:09 -0500 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-03 18:42:10 +0000 |
commit | 1a89d9887ff41e804610c5687e646fe30af2d7b2 (patch) | |
tree | 3d859f421120916e0f66ca62e2c0ba379bf90203 /MdePkg | |
parent | 5bb4f9694a6d765a8f3a3474c6835b0f167428d5 (diff) | |
download | edk2-1a89d9887ff41e804610c5687e646fe30af2d7b2.tar.gz edk2-1a89d9887ff41e804610c5687e646fe30af2d7b2.tar.bz2 edk2-1a89d9887ff41e804610c5687e646fe30af2d7b2.zip |
MdePkg:Update Return Error Macro in Base.h
Fixing RETURN_ERROR macro.
It is causing problem in Coverity Static analysis tool as we are directly converting the UINT value to INTN
Changing value from UINT to INTN might cause problem. Here we know that the values would not be in loss of data.
To increase the code quality and increase the static tool analysis score we have to change it
Cc: Jiangang He <jiangang.he@amd.com>
Cc: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
Signed-off-by: Parth Thakkar <ParthRajeshkumar.Thakkar@amd.com>
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Include/Base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 7caebbeb1f..363e0fea40 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -1058,7 +1058,7 @@ typedef UINTN RETURN_STATUS; @retval FALSE The high bit of StatusCode is clear.
**/
-#define RETURN_ERROR(StatusCode) (((INTN)(RETURN_STATUS)(StatusCode)) < 0)
+#define RETURN_ERROR(StatusCode) (((RETURN_STATUS)(StatusCode)) >= MAX_BIT)
///
/// The operation completed successfully.
|